gallery.py: Shift urlencode into the _urllib_parse namespace for Python 2
In Python 3, both parse_qs and urlencode are in urllib.parse [1,2].
In Python 2, parse_qs is in urlparse and urlencode is in urllib [3,4].
Get consistent Python-3-compatible naming by stuffing urlencode into
our _urllib_parse namespace.
[1]: https://docs.python.org/2/library/urlparse.html#urlparse.parse_qs
[2]: https://docs.python.org/2/library/urllib.html#urllib.urlencode
[3]: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.parse_qs
[4]: https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode