Reinstate exception check in GenericJni stubs.

The error check was erroneously removed in
    https://android-review.googlesource.com/1178884
where we removed the native method lookup from the
artQuickGenericJniTrampoline(). As the locking is now the
only remaining operation that can fail, update the comment
for the check. Regression test would be rather difficult to
add as we would need to force OOME during lock inflation.

Also clean up unlocking code in GenericJniMethodEnd().

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Bug: 112189621
Change-Id: I598d5f86a58c0b6171f0b2528504aba495f1b6d8
7 files changed