Use accessor methods for Object fields.

Ensure that Object fields are modified via accessors so that it's easy
to insert barriers (make all fields within Objects private). Add validity
checks to Field and Method accessors to ensure they are accessed when a
Class is in a suitable state. Add validity checks to all Object
accessors to check heap isn't corrupted. Remove hacked in strings from Field
and Method; make type fields used the dex cache that is lazily initialized.
Clean up various other TODOs and lint issues.

Change-Id: Iac0afc515c01f5419874d9cdcdb9a7b45443e3fb
diff --git a/src/common_test.h b/src/common_test.h
index c79cea6..5318008 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -89,6 +89,8 @@
     runtime_.reset(Runtime::Create(boot_class_path_));
     ASSERT_TRUE(runtime_.get() != NULL);
     class_linker_ = runtime_->GetClassLinker();
+
+    Heap::VerifyHeap();  // Check for heap corruption before the test
   }
 
   virtual void TearDown() {
@@ -127,6 +129,8 @@
     CHECK(sym != NULL);
     IcuCleanupFn icu_cleanup_fn = reinterpret_cast<IcuCleanupFn>(sym);
     (*icu_cleanup_fn)();
+
+    Heap::VerifyHeap();  // Check for heap corruption after the test
   }
 
   std::string GetLibCoreDexFileName() {