Revert "Revert "Log the apk optimization state in the MetricsLogger""

This reverts commit 203a9ab7665787c94f7d0711a1ad172588070aa6.

Reason for revert: Fix the original issue. There was a race with the
cleanup method which was resetting the app record to null.

Test: manual, adb logcat -b events | grep sysui_multi_action
      repeat steps from bugreport reporting the crash
Bug: 73102540

Change-Id: I6d9c6110a9d5dadeb9d4361592711d63563c958a
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 2b02025..04ebfcd 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -940,6 +940,11 @@
     // Empty if not set.
     optional string launch_token = 13;
 
+    // The compiler filter used when when the package was optimized.
+    optional string package_optimization_compilation_filter = 14;
+
+    // The reason why the package was optimized.
+    optional string package_optimization_compilation_reason = 15;
 }
 
 message AppStartCancelChanged {