Resolve a few errors with the new collector and the dalvik tests.

* First, Scavenge class object instance fields.  This fixes a crash in
  the 067-preemptive-unpark test.

* Assert that allocations to back the transport of gray objects
  succeeds.  Fragmentation caused by pinning can cause a blow-up in
  the size of to-space.  Until we can perform emergency promotions
  this leads to more diagnosable test failures.

* Zero dvmHeapSweepUnmarkObjects's out parameters.  This silences some
  valgrind errors.

Change-Id: Iafbd915f2020418d584477b58c512b9ff4637213
diff --git a/vm/alloc/Copying.c b/vm/alloc/Copying.c
index 8c6ebe9..9c6a79b 100644
--- a/vm/alloc/Copying.c
+++ b/vm/alloc/Copying.c
@@ -669,6 +669,7 @@
     /* TODO: add a check that we are in a GC. */
     heapSource = gDvm.gcHeap->heapSource;
     addr = dvmHeapSourceAlloc(size);
+    assert(addr != NULL);
     block = addressToBlock(heapSource, (const u1 *)addr);
     if (heapSource->queueHead == QUEUE_TAIL) {
         /*
@@ -956,8 +957,8 @@
     assert(obj->descriptor != NULL);
     LOG_SCAV("scavengeClassObject: descriptor='%s',vtableCount=%zu",
              obj->descriptor, obj->vtableCount);
-    /* Scavenge our class object. */
-    scavengeReference((Object **) obj);
+    /* Delegate class object and instance field scavenging. */
+    scavengeDataObject((Object *)obj);
     /* Scavenge the array element class object. */
     if (IS_CLASS_FLAG_SET(obj, CLASS_ISARRAY)) {
         scavengeReference((Object **)(void *)&obj->elementClass);
@@ -2621,6 +2622,8 @@
 
 void dvmHeapSweepUnmarkedObjects(GcMode mode, int *numFreed, size_t *sizeFreed)
 {
+    *numFreed = 0;
+    *sizeFreed = 0;
     /* do nothing */
 }