SOLR-4136: followup: fix getBaseUrlForNodeName to never including trailing slash when using the root context, and harden generateNodeName to not trust the caller as far as leading/trailing slashes