Fix bug in InMemoryDexClassLoader loading

InMemoryDexClassLoader can load dex files from both direct and indirect
ByteBuffers but it only respects the buffer's current position for the
latter and assumes the position is zero for the former.

Bug: 123337866
Test: art/tools/run-libcore-tests.sh

Change-Id: Id294814c68f7e9e859d67c12fe1f62e52e84c45e
1 file changed