Guard pause histogram with lock.

There is a race condition since the GC was updating this without
holding any locks. But the signal catcher could be dumping the
timings with DumpGcPerformanceInfo at the same time. This could
potentially cause out of bound errors, etc..

Also did a bit of cleanup.

Bug: 15446488
Change-Id: Icaff19d872cc7f7d31c34e4ddaae97502454e09c
3 files changed