[BUGFIX] GeneralUtility::getUrl() fails to process redirects sometimes

If PHP's open_basedir is active, CURLOPT_FOLLOWLOCATION will be disabled
by PHP. In such case any redirects will not work. This causes problems
with extensions that fetch pages of the site and hit redirects. For
example, if the site uses http and parts of it use https, extensions
like "pagepath" or "solr" will not be able to work with "secondary"
protocol.

Change-Id: I2d9e50d2d00e4c8b0c930a929be7884fd0215c21
Resolves: #45741
Releases: 6.1, 6.0
Make sure that redirect tests run only if curl is enabled
Additional fix for forge issue #45741: some curllib binaries do not return redirect_url. We have to fetch those from the returned headers.