Don't use the HTMLParser anymore.

We work with xhtml input, so it is better to use the default xml parser.
Also split cnxml generation code so we can go directly from an etree.
Remove dead code.