Create a class loader context starting from an existing ClassLoader
Extend ClassLoaderContext to be able to generate a context from an
existing class loader.
This will be used in extending the duplicate class check to cover
DelegateLastClassLoaders.
Most of the functionality is migrated from OatFileManager with some
cleanups consisting of extra docs and more conservative checks on the
integrity of the class loader chain.
Test: m test-art-host
Bug: 38138251
Change-Id: If7c18cb75bfc9e6784676f96a666bf13b04c8b8b
6 files changed