Added a --zip flag similar to --dir that allows resources to be passed
into "aapt2 compile" using a zip file.
Also refactored Compile.cpp to be easier to mock and test in the future.
Bug: 74574557
Test: aapt2_tests
Change-Id: Idb90cb97e23a219525bdead38220cbf7bc6f3cab
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