improve the tidy parsing

* Remove comments as comments may contain stuff that domdocument does like
* enforce utf8 encoding
* set CDATA as text nodes