Prune class path classes from profile

Fixes a theoretical case where classes not in the app, but in the in
the class path could have been included in the image. The dex caches
for these classes are not properly handled and need to be pruned.
Not including the classes in the image classes makes sure the that
class linker automatically prunes them and frees the dex cache with
the explicit garbage collection.

Bug: 28452385
Change-Id: Ia44813863b5f1c79367049838021a64cc3842fc9
2 files changed