Add JNI app bug workarounds.

Specifically, this hands out direct pointers for all local references,
and lets you use a JNIEnv* on the wrong thread. This is off by default,
but enabled for apps that don't have ICS as their targetSdkVersion.

Bug: 4772166
Change-Id: I20c403a8e63481a35d579d2bd3b121c80ec08f89
6 files changed