Add support for using purifier as a validator.

If a tag outside the whitelist is encountered, an InvalidTagException
is raised. If an attribute outside the whitelist is encountered, an
InvalidAttributeException is raised. Both inherit from
InvalidMarkupException.