Bug 1039943: make gallery exit if it goes to background while scanning o...

...n a 256mb device or smaller
memoryMB > lowmemMB will not work first time when gallery app is sent to background as memoryMB is still 0, but I think we should keep it as it will be helpful for subsequent visibilitychange event (while scanning) when app goes to background.