Encode the entire class loader context for dex2oat

Until now the split dependencies were passed as a flatten list to dex2oat.
In the presence of DelegateLastClassLoaders this is no longer enough to
ensure the correctness of the compilation.

This CL encodes the split dependencies together with their declared class
loader in a format accepted by dex2oat.

(partially cherry picked from commit 19da1cf72e8c448743a8c27ac6d73424ae42c7ec)

Bug: 38138251
Test: runtest -x
services/tests/servicestests/src/com/android/server/pm/dex/DexoptUtilsTest.java

Merged-In: Iaabd5d8bd5e6d027a8de5a408777fd517063d9f1
Change-Id: Iaabd5d8bd5e6d027a8de5a408777fd517063d9f1
3 files changed