Move Parser creation to its own function.

This is the first step to implement innerHTML, as we need a way create and 
initialize a parser object while setting the received DOMString (which may be 
either text/html/whatever).

Next step would be to move the TreeHandler initialization function to a new 
function.