Support for unresolved types in new-instance during verification.

Also, ensure that classes that don't load are erroneous, warn early
about exceptions left on a thread by the verifier/compiler, factor out
slowpath checks for the compiler and fix the slowpath selector for
const-class.

This change causes more dex cache misses at runtime (more slowpath
execution). It also requires a "mm clean-oat".

Change-Id: I014b49ebdd7d8f7dd2e39cc0958fc0b708d58c4c
diff --git a/src/class_linker.cc b/src/class_linker.cc
index f49f546..8f4029a 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -1039,6 +1039,7 @@
   if (!LoadSuperAndInterfaces(klass, dex_file)) {
     // Loading failed.
     CHECK(self->IsExceptionPending());
+    klass->SetStatus(Class::kStatusError);
     lock.NotifyAll();
     return NULL;
   }
@@ -1048,6 +1049,7 @@
   if (!LinkClass(klass)) {
     // Linking failed.
     CHECK(self->IsExceptionPending());
+    klass->SetStatus(Class::kStatusError);
     lock.NotifyAll();
     return NULL;
   }