ART: Change StringTable for RecentAllocations

Avoid the expensive std::distance call by caching the index inside
the set element. This requires a mutable field and a Finish call.

Effect on b/37620770 repro case: Dump time = ~ 12s -> 3.7s

(cherry picked from commit 2eeb01a9327b091124521a84c76edb2c6dcfa8f0)

Bug: 37620770
Test: m test-art-host
Merged-In: I6ab89e0e99994466183042bd59358439f98dde42
Change-Id: I6ab89e0e99994466183042bd59358439f98dde42
1 file changed