Remove use of xmlCleanupParser as suggested in the libxml2 docs. Fixes #3047.