Extract a library for common CompOS things

A small refactoring as a preliminary step to creating composd.

Create a Rust library for useful things shared by various
CompOS-related binaries. This initially includes the code to start the
VM and connect to CompOS, as well as various useful constants.

As part of extracting the start VM code I migrated to using logging
directly rather than writing to stdout/stderr for greater reusability,
as suggested by Victor.

Bug: 186126194
Test: Get odsign to run compos_verify_key, still works
Change-Id: I57b7ebcdd1a6cb604b5d739b8a8e028fd59e7b90
diff --git a/compos/common/Android.bp b/compos/common/Android.bp
new file mode 100644
index 0000000..d8fec81
--- /dev/null
+++ b/compos/common/Android.bp
@@ -0,0 +1,24 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+rust_library {
+    name: "libcompos_common",
+    crate_name: "compos_common",
+    srcs: ["lib.rs"],
+    edition: "2018",
+    rustlibs: [
+        "android.system.virtualizationservice-rust",
+        "compos_aidl_interface-rust",
+        "libanyhow",
+        "libbinder_rpc_unstable_bindgen",
+        "libbinder_rs",
+        "liblog_rust",
+    ],
+    shared_libs: [
+        "libbinder_rpc_unstable",
+    ],
+    apex_available: [
+        "com.android.compos",
+    ],
+}