ART: Discard generated image in a low-memory environment

In case the available memory after image generation is low,
discard the image and continue in interpreted mode to mitigate
low-mem issues.

Bug: 17975190
Change-Id: I67a0f9c32a6c1f1a7ec659e90b1fec834a92d323
1 file changed