Template update and extension reuse improvements

* Improved integration between our PHP purge / refresh code and our Parsoid
  service. Revision ids are now set properly, and template refresh jobs now
  avoid explicit purges.
* Support mw:Object/Ext/ref and mw:Object/Extension/<x> for now in
  extractExpansions. TODO: Fix Cite to use Extension?
* Remove the typeof from wrapper tokens

Change-Id: Ic6e349556c905bce673fb4aa22c1b2016ea091f7
Add generic addSpanWrappers method in DOMUtils

This can be used for the encapsulation of DOM-based transclusion and extension
content.

Change-Id: If15badfa04ca989cb91a242d5e4df0f6365e1de4
Merge changes If15badfa,Ic6e34955

* changes:
  Add generic addSpanWrappers method in DOMUtils
  Template update and extension reuse improvements