DO NOT MERGE Fix all unsafe caching to be like libcore.

This way, if a runtime is restarted within a process, we re-initialize all
the cached data.

Conflicts:

	src/native/java_lang_Runtime.cc -- nativeExit lost an argument in dalvik-dev

(cherry picked from commit 7756d5473fa27ce7e6ac7c31770eef7030431da4)

Change-Id: I6184fc20c2a9ec16c4b053584a4d1c3b64452d0f
diff --git a/src/native/dalvik_system_VMStack.cc b/src/native/dalvik_system_VMStack.cc
index e0862c3..ab82694 100644
--- a/src/native/dalvik_system_VMStack.cc
+++ b/src/native/dalvik_system_VMStack.cc
@@ -14,16 +14,14 @@
  * limitations under the License.
  */
 
-#include "jni_internal.h"
 #include "class_loader.h"
+#include "jni_internal.h"
 #include "nth_caller_visitor.h"
 #include "object.h"
 #include "scoped_heap_lock.h"
 #include "scoped_thread_list_lock.h"
 #include "thread_list.h"
 
-#include "JniConstants.h" // Last to avoid problems with LOG redefinition.
-
 namespace art {
 
 static jobject GetThreadStack(JNIEnv* env, jobject javaThread) {
@@ -99,7 +97,7 @@
 };
 
 void register_dalvik_system_VMStack(JNIEnv* env) {
-  jniRegisterNativeMethods(env, "dalvik/system/VMStack", gMethods, NELEM(gMethods));
+  REGISTER_NATIVE_METHODS("dalvik/system/VMStack");
 }
 
 }  // namespace art