Bug 1002593 - Get 1.3t gallery image downsampling (and other related cha...

...nges) into master