Move check for safe string out of _initDocument.
Move check for safe string out of _initDocument.

This means _initDocument now always returns a DOM node, rather than sometimes
a string, making it easier for compilers to optimise and for humans to
understand.

tdeekens/DOMPurify,tdeekens/DOMPurify,neilj/DOMPurify,neilj/DOMPurify,neilj/DOMPurify,Joris-van-der-Wel/DOMPurify,kwangkim/DOMPurify,kwangkim/DOMPurify,togusafish/t-ashula-_-DOMPurify,Joris-van-der-Wel/DOMPurify,voku/DOMPurify,tdeekens/DOMPurify,Joris-van-der-Wel/DOMPurify,ConradIrwin/DOMPurify,togusafish/t-ashula-_-DOMPurify,ConradIrwin/DOMPurify,voku/DOMPurify