Fix calculation of maximum width in WCF.ImageViewer._checkImageSize()

jQuery’s `.innerWidth()` returns the width of the element, including left and right padding, in pixels but the maximum width of an image should be the content width of its container.
Merge pull request #1818 from max-m/patch-12

Fix calculation of maximum width in WCF.ImageViewer._checkImageSize()