Fixed a whole bunch of minor stuff. Had a go at getting some of the plethora of broken tests to pass.
Synced with latest HTML5lib. Added preliminary support (currently disabled) for sanitizing REXML trees.