Fix compiler crash due to inline caches and improve docs

Fix a potential crash when extracting the inline caches from the method.
The way we copied the inline cache into a new map was not correct. In
ProfileCompilationInfo::GetMethod() we reused the same profile arena
for allocation which is not thread safe. When compiling with multiple
threads the profile arena could become corrupted due to races.

Address all the comments from the late reviews on the CL which migrates
the profiles to arena storage.

Test: m test-art-host
      compile with speed-profile apps on device
Bug: 37711886
Bug: 62062532
Change-Id: I61af5175bc68b2c7dba77afb3cdff221989cc387
8 files changed