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

...n a 256mb device or smaller