Adjust in-memory dex loading logic when backed by oat

So as to initialize an OatFile object backing in-memory dex files loaded
with InMemoryDexClassLoader, openInMemoryDexFiles needs to be passed the
current class loader context (class loader + dex elements).

It is also unnecessary to spawn the verification background thread if
the DexFile is backed by an oat. Skip it in that case.

Bug: 72131483
Test: art/tools/run-libcore-tests.sh
Test: art/test.py -b -r -t 692 -t 693
Change-Id: I0242902b8744084aca05d82144da84e637e872e5
2 files changed