Bug 1037097: restrict image decode size in MediaFrame based on device memory size

If we put this in a config file, then both the camera and gallery apps will have to duplicate the config file and the logic to read it. I like encapsulating this here in MediaFrame because then MediaFrame just takes care of not crashing, and its clients don't have to worry about it.

@dmarcos: the numbers come from our current configuration (2mp on Tarako, 3mp on 256mb devices and 5mp elsewhere) plus my experiments with what is needed (2.5mp) for low-memory flames.

@justindarc I considered making this also dependent on screen size. We could special case low-memory flames by looking for ram < 300 and screen size > 480x800, but I'm not sure it is worth it.  

@dmarcos: note that you still need to give r+ or r- in the bug itself.  I didn't even realize that you had commented here in github because you didn't update the bug.