Limit thumbnail dimensions in media edit dialog

Add a dynamic limit to image dimensions; image is limited to its max
size if it is 'thumb' and unlimited in size otherwise.

This change depends on ve-core Scalable/MediaSizeWidget adjustment
https://gerrit.wikimedia.org/r/115306 (merged)

Bug: 61282
Change-Id: I1247b1360ae50af039673fa3f2b3521e457ef578