Add document.createElement and document.createTextNode.

This re-uses the parser's node creation code. That could probably be put
somewhere nicer. Suggestions welcome!