Transfer data-mw over to generated <figure> wrapper

* data-mw was being lost from expanded attributes when the parsed
  token was converted to image-wrapper tokens.
* This will let VE provide editing support for template attributes.
* [[{{echo|File:Foo.jpg}}|thumb|131px|left|my caption]] now has
  data-mw entries for the href attribute.

TODO:
* Currently, only the href-attribute is being captured in data-mw
  and other image attributes don't seem to be.

Change-Id: I59e1c3306c16232ef0320f395a5a7f2e5d6bbe23