ART: Add getDeclaredConstructor cutout for unstarted runtime

In the vein of getDeclaredMethod and getDeclaredField. Refactor
code from java_lang_Class to share code.

Allows to compile-time initialize:
* sun.security.x509.AVAKeyword
* sun.security.x509.X500Name

Bug: 27265238

(cherry picked from commit f72f19fac0016499d33fd75b0463d0128a58a9f4)

Change-Id: I075c1b11f3408f5b31e4f84140a24fd8d3eaa17e
diff --git a/runtime/mirror/class.h b/runtime/mirror/class.h
index 9808c3e..57c3590 100644
--- a/runtime/mirror/class.h
+++ b/runtime/mirror/class.h
@@ -768,6 +768,11 @@
                                            mirror::String* name,
                                            mirror::ObjectArray<mirror::Class>* args)
       SHARED_REQUIRES(Locks::mutator_lock_);
+  template <bool kTransactionActive = false>
+  static Constructor* GetDeclaredConstructorInternal(Thread* self,
+                                                     mirror::Class* klass,
+                                                     mirror::ObjectArray<mirror::Class>* args)
+      SHARED_REQUIRES(Locks::mutator_lock_);
 
   template<VerifyObjectFlags kVerifyFlags = kDefaultVerifyFlags>
   ALWAYS_INLINE ArraySlice<ArtMethod> GetDeclaredVirtualMethodsSlice(size_t pointer_size)
@@ -1215,7 +1220,7 @@
 
   // May cause thread suspension due to EqualParameters.
   ArtMethod* GetDeclaredConstructor(
-      Thread* self, Handle<mirror::ObjectArray<mirror::Class>> args)
+      Thread* self, Handle<mirror::ObjectArray<mirror::Class>> args, size_t pointer_size)
       SHARED_REQUIRES(Locks::mutator_lock_);
 
   // Used to initialize a class in the allocation code path to ensure it is guarded by a StoreStore