normalizeSlashes
Remove any unnecessary slashes from a URL.
For example, normalizing "https://///example.com///a//b///c//" will return "https://example.com/a/b/c/".
We also check for protocol-relative URLs, i.e. those that start with "//" (so "//////example.com///a///b//c" will return "//example.com/a/b/c")
This is useful because occasionally a user may add an extra slash unintentionally as a typo. Passing such a string into the URL class will result in an exception at construction time.