Insert newlines in pre serialization

 * This implements
   http://www.whatwg.org/specs/web-apps/current-work/multipage/the-end.html#html-fragment-serialization-algorithm

Co-authored-by: Gabriel Wicke <gwicke@wikimedia.org>
Co-authored-by: Arlo Breault <abreault@wikimedia.org>

Change-Id: Idd28ea56bf63ec1aa70b1dc1396197d41de50c70