Rewrite profile file format.

The new format contains one mandatory section and several
optional sections. This allows extending the profile with
new sections that shall be ignored by old versions of ART.

We add an "extra descriptors" section to support class
references without a `dex::TypeId` in the referencing dex
file. Type indexes between the dex file's `NumTypeIds()`
and `DexFile::kDexNoIndex16` are used to index these extra
descriptors. This prepares for collecting array classes
which shall be tied to the element type's dex file even
when the array type is not needed by that dex file and has
been used only from another dex file. It also allows inline
caches to be self-contained, so we can remove the profile
index from data structures and serialized data.

The creation of the the binary profile from text files is
updated to correctly allow array types to be stored as the
profiled classes using the "extra descriptors". However,
the interface for filling in inline caches remains unchanged
for now, so we require a `TypeId` in one of the processed
dex files. The data collection by JIT has not been updated.

(cherry picked from commit c63d9672264e894d8d409e8d582b4e086b26abca)

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --speed-profile
Test: boots.
Test: atest BootImageProfileTest
Bug: 148067697
Merged-In: Idd5f709bdc0ab4a3c7480d69d1dfac72d6e818fc
Change-Id: I99b314c3de4e4bc0c515b86336ecbb283107ee38
17 files changed