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/".
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.