Fixed #20530 -- Properly decoded non-ASCII query strings on Python 3.

Thanks mitsuhiko for the report.

This commit just adds a test since the problem was fixed in 8aaca651.