Class cast, fill array and interface exception support.

This change uses the deliver exception mechanism to implement support
for a number of runtime exceptions. It also tidies up code in the
compiler and allocates a singular callee save method in the image.

Also adds a fix for JNI internal test where we weren't passing
Thread::Current() and that this value is now being used in generated code.

Change-Id: I57eefd9afe40e92fa3a7e737f1a2ed7e1094b5c1
diff --git a/src/space.cc b/src/space.cc
index 38c5720..57983d5 100644
--- a/src/space.cc
+++ b/src/space.cc
@@ -117,6 +117,9 @@
   Object* jni_stub_array = image_header.GetImageRoot(ImageHeader::kJniStubArray);
   Runtime::Current()->SetJniStubArray(down_cast<ByteArray*>(jni_stub_array));
 
+  Object* callee_save_method = image_header.GetImageRoot(ImageHeader::kCalleeSaveMethod);
+  Runtime::Current()->SetCalleeSaveMethod(down_cast<Method*>(callee_save_method));
+
   Init(map.release());
   return true;
 }