Fix selser bug while serializing templates; bug in cite output

* When multiple DOM nodes emitted by a template are unmodified
  and both happen to have valid DSR, selser emitted tpl source
  for each such DOM node (which led to duplicate citation output
  in several cases).  This makes selser more robust.

* But, the fact that multiple content nodes of an encapsulated tpl/ext.
  has the same top-level dsr is a different bug.  This currently
  happens with citations because marker metas aren't getting deleted.
  Initial investigates point to a bug either in the handleLinkNeighbors
  DOM post-processor or the DOMTraverser class in some edge case.
  Will be investigated separately.

* Based on a bug report submitted on parsoid.wmflabs.org
  /mnt/bugs/2013-04-29T09:48:52.536Z-Religion_in_Eritrea

* Unrelated: Fixed a JSHint warning

Change-Id: I8a3808b3d0e36b7e3de7c5f4aa774f78881d63e4