Smarter scaling of images for display on Story overview

The existing code only scales based on width, resulting in tall
images being cut off. This patch scales on width or height,
whichever will allow the entire image to be displayed.

So that non-square images are displayed nicely, they are centred
after scaling.
Merge pull request #116 from lachlancooper/imagescaling

Smarter scaling of images for display in Story Map