Add an XML external entity loader.

This allows the use of "data:" and "compress.zlib:" in entities and URIs.

Fixes #2329.
I think the php_ prefix is redundant when you are in the HPHP namespace. Note that a previous author omitted the prefix in libxml_error_handler, which is equivalent to PHP's php_libxml_error_handler. In my changes, I have introduced a few functions with no php_ prefix.