Fix calling instance methods of erroneous classes.

Fix the resolution trampoline to correctly handle the edge
case of calling instance methods on instances of erroneous
classes. The new test case would have previously failed the
`CHECK_EQ(code == nullptr, self->IsExceptionPending())`
because the trampoline would not retrieve the code pointer
for the direct method of an erroneous class.

Test: Added test to 174-escaping-instance-of-bad-class.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Bug: 62478025
Change-Id: Idf54a010f362c6f581a4c4aa27c33b6dc3ce6f69
3 files changed