Bug 49213: Small improvements to DOMFragment / mw:Transclusion interaction

* Always use DOMFragment encapsulation for extension expansion, irrespective
  of wrapTemplates setting. Balanced DOMFragment content will not interfere
  with token-based transclusion encapsulation, which makes this safe.
  This simplifies the code slightly by removing an extra code path and lets us
  identify and reuse nested extension output inside of template
  encapsulations.
* Clarify the interaction between token-based template expansion and nested
  mw:DOMFragment content in comments.
* Fix a bug in DOMUtils.addTypeOf

Change-Id: Icdfde77a003a3f134fbb7557046ce283d9d0db21