AAPT: Multiple period legacy support and errors

AAPT would accept files with multiple periods in the filename as input.
This lead to cases explained in b/74999475. This change adds error
messages for files with multiple periods unless the legacy flag is
present. With the legacy flag present, AAPT2 will behave like AAPT
rather than throwing an error.

Test: Added tests to aapt2_tests
Bug: 73071563
Bug: 74999475
Change-Id: I28dfceeea7b39f8e4b9e6671e0fc8793cf388f52
diff --git a/tools/aapt2/cmd/Compile.h b/tools/aapt2/cmd/Compile.h
new file mode 100644
index 0000000..d95cf1c
--- /dev/null
+++ b/tools/aapt2/cmd/Compile.h
@@ -0,0 +1,14 @@
+#ifndef AAPT2_COMPILE_H
+#define AAPT2_COMPILE_H
+
+#include "androidfw/StringPiece.h"
+
+#include "Diagnostics.h"
+
+namespace aapt {
+
+  int Compile(const std::vector<android::StringPiece>& args, IDiagnostics* diagnostics);
+
+}// namespace aapt
+
+#endif //AAPT2_COMPILE_H