Fix profile merges in profman

profman used ProfileCompilationInfo::Load() which was not preserving the
correct order of the dex files (in a multidex profile).

The CL fixes profman to use ProfileCompilationInfo::MergeWith which
guarantees the right dex order and redesigns profile storage to avoid
such mistakes in the future. Instead of keeping data in a map indexed by
the profile key, store it in a vector whose index match profile_index.
This way, any iteration over profile info becomes deterministic with
respect to the profile index of the dex files.

Test: m test-art-host-gtest-profile_assistant_test
      m test-art-host-gtest-profile_compilation_info_test
      profile YouTube.apk and compile it based on the reference profile
(failing before)

Bug: 36371709
Change-Id: Ideda1336e5aff59a7c5560429da645fe02c804c9
5 files changed