When testing CompOS, write somewhere harmless

The motivation for this is mostly to allow us to run this on real
devices in teamfood without worrying that it will break things. It's
also preparation for extending composd to do more useful things as
well as running tests.

Modify ComposTestCase to always write to /test instead of
/dalvik-cache (both inside & outside the VM).

Improve the support for multiple instances in composd, rename the
force-compile method to make it clear it does test things, and make
sure it uses a test instance of composd (so odsign will ignore it).

Modify composd_cmd to take a parameter telling it what to do.

Plus some gratuitous tweaks / reformats.

Bug: 186126194
Bug: 200020887
Test: atest ComposTestCase
Test: adb shell apex/com.android.compos/bin/composd_cmd forced-compile-test
Change-Id: I7899fe6393b556e04d9e7f8a07671d96e72bb018
diff --git a/compos/common/lib.rs b/compos/common/lib.rs
index 104b8e5..0b84a28 100644
--- a/compos/common/lib.rs
+++ b/compos/common/lib.rs
@@ -33,11 +33,15 @@
 
 /// The sub-directory where we store information relating to the pending instance
 /// of CompOS (based on staged APEXes).
-pub const PENDING_DIR: &str = "pending";
+pub const PENDING_INSTANCE_DIR: &str = "pending";
 
 /// The sub-directory where we store information relating to the current instance
 /// of CompOS (based on active APEXes).
-pub const CURRENT_DIR: &str = "current";
+pub const CURRENT_INSTANCE_DIR: &str = "current";
+
+/// The sub-directory where we store information relating to the instance of CompOS used for
+/// tests.
+pub const TEST_INSTANCE_DIR: &str = "test";
 
 /// The file that holds the encrypted private key for a CompOS instance.
 pub const PRIVATE_KEY_BLOB_FILE: &str = "key.blob";