Credentials parameters in URLs - http://user:pass@host

Use HttpClient for HTTP URLs in ResourceUtils.getResourceFromUrl

HttpUrlConnection doesn't support authenticating using credentials in the url (http://user:pass@host) and redirecting between protocols.
Switch to HttpClient which supports multiple authentication protocols and manually get the credentials from the URL, passing them to HttpClient.
As a side effect redirection between protocols works.
> what does (?:s?) do?
Optional 's'
(?: is non-capturing group with s? inside.

Re-worked the code so it doesn't use the regex at all.