support non-ascii unicode strings in _get_all_query_args. Fixes: #2558
fix comparison of query value for py3. Refs: #2558
fix check for empty value

thanks @methane
Merge pull request #2559 from kouk/nonasciiqueryargs

Support non-ascii unicode strings in _get_all_query_args. Fixes: #2558, #2559.