Add JNI globals tracing

Add separate tracing for global and weak global JNI references.

We only add an entry for every Nth addition or removal of a reference.
Currently N = 17 to minimize danger of getting in sync with some
application code pattern.

Bug: 189738006
Bug: 192318532
Test: Build boot and look at trace in S build.
Change-Id: I2f223c2a07932f97f89ff87d57f4379c1396ef9e
3 files changed