Prevent FC in low memory conditions

Reupload of http://review.cyanogenmod.org/36875
Modified with suggestions by David van Tonder in the original patch

Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: I974eea82cac3dfe3a01e5d79c1721d3514f940f6