Dedup original dex file for classes transformed on first load.

We set the originalDexFile field to a native pointer to the
art::DexFile (as a boxed Long). In the case where there were no
non-can_retransform_classes agents this DexFile will be owned by the
transformed classes ClassLoader and is guaranteed to be valid for as
long as the Class is. This means we can simply keep track of that
pointer to hold onto the original Dex file.

Test: ./test.py --host -j40
Bug: 31455788
Change-Id: I0e5a74f20f86d32dc73babe64b81469b3155c4dd
3 files changed