Test framework for tag soup parsing

Also fix a couple of minor bugs in the current html 5 parser (self
closed <style/>, <script/>, <textarea/> tags and re-mapped namespace
prefixes.