Curl: allows setting the CURLOPT_PROXYAUTH setting through GDAL_PROXY_AUTH=BASIC/NTLM/DIGEST/ANY, allow setting CURLOPT_HTTPAUTH through GDAL_HTTP_AUTH=BASIC/NTLM/GSSNEGOTIATE/ANY; refactor code to avoid code duplication (patch derived from Jeremy Palmer's patch, #4998)

git-svn-id: https://svn.osgeo.org/gdal/trunk/gdal@25661 f0d54148-0727-0410-94bb-9a71ac55c965