ART: Add allocation tracking to JNI global refs

Add allocation tracking to global references. When the reference
table's free capacity falls under an adjustable value, enable
tracking so as to help tracking down possibly-leaky allocations.

Bug: 67044702
Test: m test-art-host
Change-Id: Ic17d6ebbad895b54c5ac63558027e04aef2b14c1
7 files changed