Fix Issue 1922 - Allow image resizing when zooming

On Android 4.4 (with the new Chrome backend), images with max dimensions specified already zoom in correctly. For those devices, we've added a user agent check and continue to use pure CSS and avoid javascript.

On older platforms, resort to javascript to determine suitable dimensions and manually set the style for each image. Images that exceed the window dimensions are resized to fit in the window.

Thanks to @brunodea for the initial work on this, and to Moin Zaman's solution (http://stackoverflow.com/a/3971875) which served as a guide for the resizing code.
Merge pull request #309 from hssm/issue-1992

Fix Issue 1922 - Allow image resizing when zooming