Prevent exception bugs in class linker

There were some places that could throw exceptions but still succeed.
This caused the allocation entrypoints to occasionally allocate a
heap object with a pending exception.
Also added some additional AssertNoExceptionPending.

Bug: 17164348

(cherry picked from commit 58c016c3f85d6d5496cea25325778de3a8d9a3ac)

Change-Id: Id9918fa8f1a5d713b847cb95cdade925ff80a826
2 files changed