Revert "Revert "[dexopt] Allow secondary dex files to generate app images""

Reason for revert: Breaking up the original topic into individual CLs so
that we can merge non-broken code sooner (and fix/merge the broken test
on its own).
Reverted Changes:
Ic30045e59: Revert "[dexopt] Allow secondary dex files to gene...

Test: adb shell pm bg-dexopt-job with app installed that uses secondary
dexes, verify app image is generated for secondary image. Launch app and
verify no class linker/class loader/image space warnings in logcat

(cherry-picked from commit b79acc02221cc4573708ae29aac0cd3281d34520)
Bug: 149098478

Merged-In: Id6e633fb95798041df75e0e3e8b926aa6038a9ac
Change-Id: Id6e633fb95798041df75e0e3e8b926aa6038a9ac
1 file changed