ART: Throw on soft verify failure in InitializeClass().

Avoid a CHECK() failure in ClassLinker::EnsureInitialized()
when the transactional interpreter tries to initialize a
class with soft verification failures.

(When desired, compilation can be forced to fail for such
failures with the --abort-on-soft-verifier-error option.)

Test: Added a regression test to image_test.
Test: m test-art-host-gtest
Test: Pixel 2 XL boots.
Test: m test-art-target-gtest
Change-Id: Ibb8cf6ade81b5a2944c7e484251a67aba1f1fbeb
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index e3dfdb3..c9257b9 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -4903,7 +4903,10 @@
         } else {
           CHECK(Runtime::Current()->IsAotCompiler());
           CHECK_EQ(klass->GetStatus(), ClassStatus::kRetryVerificationAtRuntime);
+          self->AssertNoPendingException();
+          self->SetException(Runtime::Current()->GetPreAllocatedNoClassDefFoundError());
         }
+        self->AssertPendingException();
         return false;
       } else {
         self->AssertNoPendingException();