Overload get_connection to allow passing in an already-constructed uri_p...

...tr. This avoid the need for using the regex, which GCC does not implement yet.