Add 2040-huge-native-alloc test

Check that if we allocate more than a gigabyte of native memory and then
repeatedly notify the collector of native allocation, we temporarily
block the allocation for a reasonable amount of time to allow the GC to
catch up.

We previously had some coverage of this, but lost it when BigInteger
moved away from using native allocation.

Test: Ran locally on host; TreeHugger.
Bug: 186592536
Change-Id: Id7d120e00630e26bcdf396a80069c9cca7c00804
8 files changed