Tiled Gallery: Got rid of maybeSetAttributes.

Having to set data attributes describing image dimensions manually in JavaScript is troublesome, especially since the rendered HTML template knows the exact dimensions. Original image dimensions are now set to the images and tiled gallery rows and groups in the template, so that the JavaScript resizing logic can use them immediately.