Make url.query consistent between slow & fast path

Match the behavior of the slow path by setting url.query to an empty object
when the url contains no query, but query parsing is requested.

Also add a test for this case.

issue: #8332
Please remove the link. Any needed information about why this code was introduced can be viewed via `git blame` and looking at the commit log.