ObjPtr<>-ify mirror::Class.

And move function definitions that rely on obj_ptr-inl.h
from class.h to class-inl.h .

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: I5ccc765d0a02b1d37cb39ed68c17b8456faf92ea
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index a81c7e2..2670f91 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -298,13 +298,13 @@
   return dex_file->GetTypeDescriptor(dex_file->GetTypeId(type_idx));
 }
 
-inline mirror::ClassLoader* ArtMethod::GetClassLoader() {
+inline ObjPtr<mirror::ClassLoader> ArtMethod::GetClassLoader() {
   DCHECK(!IsProxyMethod());
   return GetDeclaringClass()->GetClassLoader();
 }
 
 template <ReadBarrierOption kReadBarrierOption>
-inline mirror::DexCache* ArtMethod::GetDexCache() {
+inline ObjPtr<mirror::DexCache> ArtMethod::GetDexCache() {
   if (LIKELY(!IsObsolete())) {
     ObjPtr<mirror::Class> klass = GetDeclaringClass<kReadBarrierOption>();
     return klass->GetDexCache<kDefaultVerifyFlags, kReadBarrierOption>();