Class getField/Method returns NULL if type/args are unresolved.

These changes check that a field's type is resolved before returning it
through getDeclaredField, and that a method's return type and argument
types are resolved before returning it through getDeclaredMethods. This
fixes test failures in libcore MissingClassesTest.

(cherry picked from commit 1ae431a01516b6c91f031aff37c756b7e4f63dd1)

Change-Id: I6bd5601a975e677be6438b1efcb1b1f1ecde900c
diff --git a/src/runtime_support.cc b/src/runtime_support.cc
index e76e89f..93d4728 100644
--- a/src/runtime_support.cc
+++ b/src/runtime_support.cc
@@ -1164,7 +1164,10 @@
   // reset index, will index into param type array which doesn't include the receiver
   param_index = 0;
   ObjectArray<Class>* param_types = proxy_mh.GetParameterTypes();
-  DCHECK(param_types != NULL);
+  if (param_types == NULL) {
+    CHECK(self->IsExceptionPending());
+    return;
+  }
   // Check number of parameter types agrees with number from the Method - less 1 for the receiver.
   DCHECK_EQ(static_cast<size_t>(param_types->GetLength()), num_params - 1);
   while (cur_arg < args_in_regs && param_index < (num_params - 1)) {