Do only follow HTTP and HTTPS redirects

We do not want to follow redirects to other protocols since they might allow an adversary to bypass network restrictions. (i.e. a redirect to ftp:// might be used to access files of a FTP server which might be in a secure zone and not be reachable from the net but from the ownCloud server)
There is some duplication with https://github.com/owncloud/core/pull/11032/files#diff-d3fcad49ec7088a1005cfe4a3b4bd62fR134. Make that a method `getDefaultContextArray` on the helper?