do not modify the query string

Fix the issue of multiple consecutive slashes being replaced by a single slash referenced in #703 and #710 by separating the query string from the rest of the URL in `common.urlJoin`. I tried removing trailing slashes as suggested by @yulesyu in #703 but that still caused issues if the query string ended in `//`