Fix file:// URL decoding in libxml functions and elsewhere

Summary: Anything that accepts a file URL should be able to accept an actual
file URL, as per RFC 1738, without requiring escape codes to be pre-decoded.
So, implement decoding in all the relevant places by means of a new function
StringUtil::DecodeFileUrl(). Use url_parse() as a backend, which should cover
the relevant corner cases (or can be fixed if it doesn't).

Refactor the many places in the code where a string is checked for a file://
prefix to see if it is a file URL. Some methods are inefficient, requiring
copying. Some are wrong -- RFC 1738 section 2.1 states that the protocol is
case-insensitive, so strncasecmp should be used instead of strncmp.

Refactor the identical *_get_valid_file_path() in the XML extensions into a new
libxml_get_valid_file_path(). Implement it with url_parse() instead of the
idiosyncratic xmlCreateURI(). If there's any test case which works with
xmlCreateURI() but fails in DecodeFileUrl(), then that should be fixed in
DecodeFileUrl() for the benefit of non-libxml callers.

Reviewed By: @fredemmott

Differential Revision: D1445181