Support stream wrappers in XML parser extensions

Closes: #2829
Don't close libxml stream during sweep

It asserts if you try. PlainFile::sweep() etc. will close the FDs.