Handle OOM situation in java-heap more aggressively

Currently we perform several rounds of GCs before throwing out-of-memory
exception. Furthermore, even if a small amount of memory is reclaimed,
we call it success. This leads to janky app behavior and timeouts
during finalization.
In this change we perform the next GC type, and if that doesn't reclaim a
minimum amount of free space, then perform a final GC cycle, which is
full-heap, including soft-references and evacuates all regions to be
thorough. If that also failes, then we throw OOME.

Bug: 144525957
Test: art/test/testrunner/testrunner.py
Change-Id: I34af2250661f886c8c2ba32637ee37886e2021d7
1 file changed