Add support for registering classpath classes status.

By doing class unloading after each dex file compilation, we are loosing
away verification done on classpath classes.

This change introduces a new table for keeping around class status of
classpath classes.

Multidex quickening compilation improved by ~5% by not re-verifying classpath
classes.

Bug: 63467744

test: test.py
test: golem successfully compiles FB
Change-Id: I629c0a7d86519bbc516f5e59f7cd92ca6ca842eb
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f95b493..c48fcca 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4309,6 +4309,12 @@
       EnsureSkipAccessChecksMethods(klass, image_pointer_size_);
     }
   }
+  // Done verifying. Notify the compiler about the verification status, in case the class
+  // was verified implicitly (eg super class of a compiled class).
+  if (Runtime::Current()->IsAotCompiler()) {
+    Runtime::Current()->GetCompilerCallbacks()->UpdateClassState(
+        ClassReference(&klass->GetDexFile(), klass->GetDexClassDefIndex()), klass->GetStatus());
+  }
   return verifier_failure;
 }