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