ParserTests: serialize DOM to HTML + reparse in wt2wt/selser modes

* Serializing DOM to HTML and reparsing HTML to DOM before
  converting to wikitext (in wt2wt and selser modes) is a more
  accurate representation of how this happens in practice in
  production when VE and clients send Parsoid a HTML string.

  Parsing from HTML always canonicalizes the DOM by collapsing
  multiple adjacent text nodes together (for ex.) which simplifies
  DOM diff and html2wt serialiation algorithms.

* This fix to parserTests also exposed a bug in our HTML-pre
  serialization code! This has always been broken but was hidden
  by parserTests because we reused original DOM.

  We do not reproduce the stripped newline back in wikitext because
  the serializer never uses the HTML-pre handler for serializing
  them. It always uses the generic HTML handler for HTML-pre nodes.

  Can be verified as follows:
-------------
[subbu@earth tests] echo "<pre>\n foo\n</pre>" | node parse --wt2wt
<pre> foo
</pre>
-------------

  This bug will be fixed in a followup patch.

* This change slows down parserTests run from about ~70 sec to ~100 sec
  Smarter caching could win back some of the benefit maybe, but for now,
  correctness trumps a faster parserTests run.

* Also got rid of DOM cloning in a couple places which didn't seem to
  matter much for speed of the parserTests run.

* 6 wt2wt tests now fail (all <pre> related) and several additional
  selser tests are now failing as well (mostly <pre> related).

* Tweaked two References tests to use canonical quotes and whitespace
  to eliminate spurious wt2wt and selser failures (more visibly exposed
  because of tweaks to the parserTests script).

  2 wt2wt, 2 html2wt and associated selser tests are now green.

Change-Id: I369edec59c8489a4efc3b15d919130b102d06a58