ART: Ignore result for exception-case JNIEndWithReference

The value may not contain a valid jobject, so ignore and use null
directly.

Refactor a bit to have one common function for both synchronized
and non-synchronized case.

Add a test to the JNI compiler tests.

Bug: 18135031
Change-Id: If2f004a112f36f4ff68172a946dec67ce561ae4d
3 files changed