ART: Stash any exception before dumping a stack

Dumping a managed stack entails dumping held locks, in the process
of which the verifier will be run. The verifier works under the
assumption that there were no exceptions when started. This
assumption is violated for example on certain JNI aborts.

The solution is to stash any pending exception before dumping the
stack, and re-installing it afterwards.

Bug: 17669899
Change-Id: I3cd0526b52fce1acaa35fe0e419176478c82be22
1 file changed