Wrap document.write

When we do a document.write we reset the lastChild_ and nextSibling_ pointers
so that next time we get lastChild or nextSibling we recompute them.

This also adds a dependency on tooltkitchen/tools to reuse the htmlSuite and
htmlTest.