Fix compiler filter / reason reporting and add the ISA to the metrics

The compiler filter / reason reporting was not accurate for a variety
of reasons. (e.g. reporting was only done at startup, it was relying
on imprecise APIs and had errors in the logic).

In order to keep track of the precise optimization status, this CL
introduces the concept of AppInfo, which encapsulates the data about
the application / system server code paths, their optimization status
and possible other metadata (e.g. profiles).

To populate it, we rely on 2 distinct events:
1) The framework calling VMRuntime#registerAppInfo to inform the
runtime about the applications code paths and their types (e.g. primary,
split, secondary).
2) Class loading, when we can determine the actual optimization status
like filters, reasons, and whether or not we can load the odex files.

These events may happen in any order so we could deal with a partial
state at some point in time, but in the majority of cases they always
happen at Class Loading, followed by RegisterAppInfo.

This CL also deletes the OatFileManager#getPrimaryOatFile which was
a misleading API as it didn't work in most cases. It also adds more
tests to the metrics/reporting infra for previous missing or
unimplemented cases.

Test: gtest
Bug: 170149255
Change-Id: If0a7a25d06ff6fb89fe4861139b7dee61c05814d
17 files changed