(Bug 49182) Emit data-mw for references extension as well

* data-mw wasn't being emitted for references -- there was a FIXME
  for it.

* Tested fixes on example from 5e35a522.

* Removed meta-placeholder that was being emitted for <references />
  tags without any refs to emit since VE might add references and
  this wont be valid anymore.  Serializer can also handle references
  output without any content.  So, no need for that hack anymore.

  Verified by testing with "<references />" input

Change-Id: I3d2852f2c6a88bf22145add9b2173fd99d152775