Fix race with Heap::ClampGrowthLimit and GC

Aded logic for handling the temp bitmap if the GC is running and
the live bitmap is clamped to the mark bitmap. This fixes the SIGABRT
from ClampGrowthLimit if the GC clamped the bitmaps at this point.

Also added locking of the heap_bitmap_lock_ so that added a lock so
that the temp bitmap doesn't change from underneath us.

Bug: 20043461

Change-Id: Ib427e40bcdf149de0408b4b53e6524f51463f0af
diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc
index 7e967f9..be7344a 100644
--- a/runtime/gc/heap.cc
+++ b/runtime/gc/heap.cc
@@ -3145,6 +3145,8 @@
 }
 
 void Heap::ClampGrowthLimit() {
+  // Use heap bitmap lock to guard against races with BindLiveToMarkBitmap.
+  WriterMutexLock mu(Thread::Current(), *Locks::heap_bitmap_lock_);
   capacity_ = growth_limit_;
   for (const auto& space : continuous_spaces_) {
     if (space->IsMallocSpace()) {