Fix the functional tests busted by Revision 212. Sync with latest HTML5lib.
Fix Diego Restrepo's bug (see Rev 184). Update to latest HTML5lib.