Fix GarbageCollector to work with VERIFY_OBJECT_ENABLED

There were two problems with the GC:
1.) roots were being missed for most of the C++ fields
2.) Heap::RecordFree(Object) was not being called, only Space::Free

To solve #1, added all C++ shadow fields to libcore.
This involed updating dalvik to cope with the new sizes and offsets.
This had the positive side effect of allowing a lot of special cases
in the object scanning and image writing.

To solve #2, added a call to the now public Heap::RecordFree from MarkSweep

Given the now better working GC:
- Reenabled HeapTest.GarbageCollectClassLinkerInit which is now passing.
- ImageWriter now GC's before writing an image to avoid garbage.

Change-Id: Ie7d1cc89e0bcf314cb37f0cabcb8593bf6e4d4be
diff --git a/src/class_loader.h b/src/class_loader.h
index ff62d12..80435c6 100644
--- a/src/class_loader.h
+++ b/src/class_loader.h
@@ -29,6 +29,7 @@
   // TODO: remove once we can create a real PathClassLoader
   std::vector<const DexFile*> class_path_;
 
+  friend struct ClassLoaderOffsets;  // for verifying offset information
   DISALLOW_IMPLICIT_CONSTRUCTORS(ClassLoader);
 };
 
@@ -38,6 +39,8 @@
   // Field order required by test "ValidateFieldOrderOfJavaCppUnionClasses".
   String* original_path_;
   Object* path_list_;
+
+  friend struct BaseDexClassLoaderOffsets;  // for verifying offset information
   DISALLOW_IMPLICIT_CONSTRUCTORS(BaseDexClassLoader);
 };
 
@@ -49,6 +52,7 @@
   static void ResetClass();
  private:
   static Class* dalvik_system_PathClassLoader_;
+  friend struct PathClassLoaderOffsets;  // for verifying offset information
   DISALLOW_IMPLICIT_CONSTRUCTORS(PathClassLoader);
 };