Use pre-allocated Throwables from the boot image.

The pre-allocated OOMEs and NoClassDefFoundError were stored
in the boot image but they were not used, we instead used to
allocate and use new objects. This change adds references to
the image roots, so that these Throwables can be used when
starting the runtime using the boot image.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 77947463
Change-Id: I2079344dee61242bf0bef5c32770c33ac8a6b7a4
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 227ace0..44b0c2b 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -419,7 +419,7 @@
 }
 
 bool Class::IsThrowableClass() {
-  return WellKnownClasses::ToClass(WellKnownClasses::java_lang_Throwable)->IsAssignableFrom(this);
+  return GetClassRoot<mirror::Throwable>()->IsAssignableFrom(this);
 }
 
 void Class::SetClassLoader(ObjPtr<ClassLoader> new_class_loader) {