Fix ProfileCompilationInfo to handle extra descriptors correctly.

Before this change, the code modified `type_index` in-place when
handling extra descriptors, which caused `type_index` to be wrong in
subsequent iterations. The problem does not occur when we only load one
profile, in which case, the in-place assignment is a no-op, but it
occurs when we load multiple profiles. This change fixes the problem.

Bug: 203492478
Test: manual -
  1. Run dex2oat for core-oj.jar with both
     "/apex/com.android.art/etc/boot-image.prof" and
     "/system/etc/boot-image.prof".
  2. No "Invalid type index." or "Invalid inline cache type index."
     error observed (which was observed without this fix).
Test: All ART run-tests and gtests in Presubmits
Change-Id: I328cf260266417c0f94791d586144073455d236d
1 file changed