Delegate all JNI calls to a single thread

Previously, JNI calls were performed on any thread that requires them.
This required all of those threads to be attached to the JVM before the
JNI call and then detached from it after it's done.

To improve performance, this CL delegates all JNI calls to a specialised
JNI threads.

Switch to using ScopedLongArrayRO in getRedactionRangesInternal.

Test: manual
Bug: 140726584
Bug: 142314536
Change-Id: I64e40eb694d8291eda6b1e8b0035b72e79d737e7
4 files changed