Fix the invocation interface.

Previously, we just cast the Runtime* to a JavaVM*, which blew up as soon as
the caller tried to use their supposed JavaVM*.

This also implements NewObjectArray. Running aexecd on the host, this gets us
as far as not having an x86 CreateInvokeStub...

Change-Id: Iba5f148797d053fba1c69af99b20508ea6aff5cb
diff --git a/src/runtime.h b/src/runtime.h
index f04aefe..56a8970 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -9,6 +9,7 @@
 #include "jni.h"
 #include "globals.h"
 #include "macros.h"
+#include "scoped_ptr.h"
 #include "stringpiece.h"
 
 namespace art {
@@ -53,6 +54,10 @@
     return class_linker_;
   }
 
+  JavaVM* GetJavaVM() {
+    return java_vm_.get();
+  }
+
   void SetVfprintfHook(void* hook);
 
   void SetExitHook(void* hook);
@@ -71,6 +76,8 @@
 
   ClassLinker* class_linker_;
 
+  scoped_ptr<JavaVM> java_vm_;
+
   // A pointer to the active runtime or NULL.
   static Runtime* instance_;