Check external dex file checksum in `OatFile::Setup`.

And strenghten `class_def_index` check in `FindOatClass()`.

Also refactor .bss metadata reading to work around cpplint
flagging >500 non-comment lines in the function and change
tags to flag different .bss type sections.

(cherry picked from commit 5f1fafb6c9ec93e18a2d4da9c1d4d1264f9ba93d)

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 190491023
Merged-In: I85a0d9a750425b4e884dad12f47e414ccb38efe6
Change-Id: I1c502936e34fe22945eb10803c94067af7b402f3
1 file changed