Make heap exhaustion robust in app-image-methods test

It's need as we now throw OOME even when a small percentage of heap is
still free. This change ensures that the heap is fully exhausted, which
is expected by the test.

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