Support Git repository HTTP URLs with variables in them.

When a Git repository URL for HTTP(S) has a variable in it,
it would not work because the URL with the variable was stored
and later the URL with the variable replaced was matched against it,
which would fail. Thus the stored credentials, which would have been
applicable for this URL, were not chosen.
This patch detects URLs with variables (of the form ${varname})
in them and stores them converted to a regular expression
in which (.+) replaces the variable. If no direct hits for a URL
are found, it is matched against such formed regex pattern URLs.

[FIXES JENKINS-20677]