Switch to indirect references rather than direct pointers.

This also required a bit of fiddling to break cyclic dependencies,
now "jni_internal.h" needs Mutex from "thread.h".

Change-Id: I1d6fb2d801c190f72255f5e447a0a8a65cc3e673
diff --git a/src/runtime.h b/src/runtime.h
index e9d373d..9879023 100644
--- a/src/runtime.h
+++ b/src/runtime.h
@@ -3,12 +3,15 @@
 #ifndef ART_SRC_RUNTIME_H_
 #define ART_SRC_RUNTIME_H_
 
+#include <stdio.h>
+
 #include <string>
 #include <utility>
 #include <vector>
 
+#include <jni.h>
+
 #include "globals.h"
-#include "jni_internal.h"
 #include "macros.h"
 #include "scoped_ptr.h"
 #include "stringpiece.h"
@@ -19,6 +22,7 @@
 class ClassLinker;
 class DexFile;
 class Heap;
+class JavaVMExt;
 class String;
 class ThreadList;
 
@@ -84,7 +88,7 @@
   }
 
   JavaVMExt* GetJavaVM() const {
-    return java_vm_.get();
+    return java_vm_;
   }
 
  private:
@@ -102,7 +106,7 @@
 
   ClassLinker* class_linker_;
 
-  scoped_ptr<JavaVMExt> java_vm_;
+  JavaVMExt* java_vm_;
 
   // Hooks supported by JNI_CreateJavaVM
   jint (*vfprintf_)(FILE* stream, const char* format, va_list ap);