Support custom stream wrappers in XMLReader::open()

Summary: This is similar to the treatment that was applied to a few other places in
842d6fb7dcd6d: manually create an IO object and use that to create the
xmlTextReader, rather than just calling xmlReaderForFile. This fixes web
importing of pages in MediaWiki.

Closes https://github.com/facebook/hhvm/pull/3840

Reviewed By: @ptarjan

Differential Revision: D1576426

Pulled By: @swtaarrs