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
7 files changed