Add --compilation-reason option to dex2oat

The compilation reason is an optional metadata specifying the reason for
compiling the apk. If specified, the string will be embedded verbatim in
the key value store of the oat file.

This will allow a more precise performance monitoring based on the actual
reason for compilation (e.g. install time vs background dexopt time).

Test: dex2oat_test
Bug: 73102540
Change-Id: I73c7fcc73e37a695f1684d9e282c7cc5be3030f8
diff --git a/runtime/oat.h b/runtime/oat.h
index 8f81010..af14b3e 100644
--- a/runtime/oat.h
+++ b/runtime/oat.h
@@ -45,6 +45,7 @@
   static constexpr const char* kClassPathKey = "classpath";
   static constexpr const char* kBootClassPathKey = "bootclasspath";
   static constexpr const char* kConcurrentCopying = "concurrent-copying";
+  static constexpr const char* kCompilationReasonKey = "compilation-reason";
 
   static constexpr const char kTrueValue[] = "true";
   static constexpr const char kFalseValue[] = "false";