Clean up getTreeBuilder, remove dom.TreeBuilder from 0.10 legacy.

Still needs an entry in CHANGES.rst