Choose an HTTP GET approach based on capabilities

Rather than expect a particular implementation to be available,
iterate through the possible approaches to fetching URLs until
we find one which works.

Preference is given to cURL, followed by fopen (if allowed by
the PHP configuration), then shelling out to php cli which invokes
fopen (allow_fopen_url doesn't matter for php cli).

This is quite nasty, but I didn't want to remove the cURL
implementation as I'd like to be able to migrate to this if we
can get the server configuration changed.
Fix arguments to fopen

The stream context needs to be the 4th argument; the 3rd argument
is use_include_path, which we can set to false, as we are always
fetching from remote locations with HttpClient.
escapeshellarg is not suitable when fetching URLs

Using escapeshellarg on a filename before passing it to the HTTP
client doesn't work, as it produces URLs like this:

http://localhost:4567/'documentation/00-Getting-Started.md'

which are invalid.