SOLR-20: make private URL parsing function public so it is accessible to an embedded solrj client. (this commit also includes StrUtils refactoring ommited of previous commit)