(Bug 48808) Serialize edited extension content

* Extensions were being serialized back to original wikitext src.
* This patch now uses data-mw content to serialize to extension
  wikitext.
* Fixed Cite to add attributes for ref to data-mw so that attributes
  roundtrip back (WS and quotes are normalized).
* TODO:
  1. add data-mw for <references> in Cite.js
  2. add data-mw for all other extensions in the extension handler

Change-Id: If3c35398a409f4775204407b3dcf2442ec2fb4e5