Faster dex file verification.

Speed up DexFileVerifier by introducing a "map" from type
index to class definition index, implemented as vector<>.

Refactor the verification for correctness, moving checks
against the header into the CheckIntraSection() phase and
checks that rely on other sections to CheckInterSection().
This also allows us to remove some unnecessary checks in
the latter phase.

Improves the "OpenDexFile" time from --dump-timings output
by over 2x for one tested huge apk.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing.
Bug: 153966283
Change-Id: Iae423b8f463648360276130c8b21ab6057cf73a7
2 files changed