Remove static_class_ from Method/VarHandle and CallSite.

And add MethodHandle to the class roots to avoid extra
indirection through MethodHandleImpl.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Iaf172f3732677f2b4509e8297e6e9af5fb81a89f
diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc
index 5d4b9e8..9c02dce 100644
--- a/runtime/jit/jit.cc
+++ b/runtime/jit/jit.cc
@@ -24,6 +24,7 @@
 #include "base/memory_tool.h"
 #include "base/runtime_debug.h"
 #include "base/utils.h"
+#include "class_root.h"
 #include "debugger.h"
 #include "entrypoints/runtime_asm_entrypoints.h"
 #include "interpreter/interpreter.h"
@@ -632,7 +633,8 @@
   }
   if (method->IsNative()) {
     ObjPtr<mirror::Class> klass = method->GetDeclaringClass();
-    if (klass == mirror::MethodHandle::StaticClass() || klass == mirror::VarHandle::StaticClass()) {
+    if (klass == GetClassRoot<mirror::MethodHandle>() ||
+        klass == GetClassRoot<mirror::VarHandle>()) {
       // MethodHandle and VarHandle invocation methods are required to throw an
       // UnsupportedOperationException if invoked reflectively. We achieve this by having native
       // implementations that arise the exception. We need to disable JIT compilation of these JNI