Adjust NativeAllocationRegistry for new accounting

Provide a new NativeAllocationRegistry constructor that does not
require a size, assuming instead that all native allocation goes
through malloc() and the GC tracks native allocation anyway.

Use it in BigInt, Pattern, and Matcher, the traditional problem cases
for proper size tracking. We should use it in many other cases as well.
The fact that we're not yet doing so has the effect that we're currently
double-counting some allocations. However a mere factor of 2 error is
likely to be a huge improvement already over prior accounting.

Force the argument to setTargetHeapUtilization to be at least 0.1.
Very small numbers are not reasonable, and could cause overflows in ART.
(Needed by accounting cleanups in the companion ART CL.)

Bug: 111447610

Test: atest NativeAllocationRegistryTest (option 2)
Test: Built and booted AOSP. Ran 175-alloc-big-bignums.

Change-Id: Iad76e1efe0849ddf03834571f71a00e684e82858
8 files changed