Move logic to get profile class descriptors to profile info

Move and simplify logic used to get a descriptor set for app image
creation. Code is covered by TestLayoutAppImage in dex2oat_test.

Motivation:
If we are class unloading in dex2oat, we won't have all the dex files
registered at once.

Bug: 63467744
Test: test-art-host
Change-Id: I1e3616ee0a731061c347677713dba07e603eaa08
5 files changed