implement HTML Purifier filter

This should give us STRONG protection against all kinds of XSS attacks
while preserving rich formatting options. Also it will enhance the
well-formedness of pages.