Make Release(JNI_COMMIT) faster
The Release<primitive>ArrayElements and ReleasePrimitiveArrayCritical
calls take a "mode" argument. If you pass in JNI_COMMIT, the storage
isn't actually released; instead, the buffer contents are flushed to
the backing storage. If the VM has handed you a pointer to the raw
data rather than a copy, the call is a no-op.
In its present incarnation, it's a no-op that changes the thread state,
adding overhead and the possibility of suspension. This change moves
the test for JNI_COMMIT outside the enter/exit macros.
Bug
3430203
Change-Id: I8426647ee02b2336c5c90146028fc207cfbacc3a