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

To elaborate on this a little more, is it enough to simply consider the amount of installed memory on the device? Doesn't the device's screen resolution also play a role in determining the maximum image size? (i.e.: 256 MB Flame vs. 256 MB Hamachi)

It would likely complicate things much more if we had to take into account the screen resolution as well as the memory. But, I agree with @dmarcos that it would be better if we could just extract this matrix of mem -> megapixels into a config file.