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

I agree, it makes me nervous having config scattered around the place. Also I'd prefer to see a function whose job it was to determine the `maxImageDecodeSize`, and a single line that sets it. This makes things testable and self documenting :)

```js
MediaFrame.maxImageDecodeSize = pixelsFromMemory(memory);
```