Bugfix in DOMUtils.addSpanWrappers: childNodes modified while iterating

* addSpanWrappers was modifying a childNodes array while iterating
  over it. This causes strange wt2wt errors on snippet like this:

  [[File:Foo.jpg|thumb|a <\!--b--> [[Bar]] <\!--c--> d]]

  The 2nd comment would get lost.

* TODO: Build a suite of tests aimed at testing sub-pipeline parsing,
  DOM fragment building, and DOM fragment unpacking.

Change-Id: I6e2ac8282c90a6b46b9f80fcc82d0032fb35685e