Revert "Revert^2 "Handle OOM situation in java-heap more aggressively""

This reverts commit 04a46f9ea4639b070fb9541810d11bc731862284.

Reason for revert: art-tests still failing

Change-Id: If1c1096319efcfe2031cde38669f3fb1679d597d
1 file changed