Prevent FC in low memory conditions

Add missing null cursor checks

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

Change-Id: I974eea82cac3dfe3a01e5d79c1721d3514f940f6
Merge branch 'cm-10.1' of git://github.com/CyanogenMod/android_packages_apps_Mms into jellybean