querystring: custom encode and decode

Not all querystring are utf-8 encoding, make querystring can be used
to encode / decode `non-utf8` encoding string if necessary.

Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
Merge remote-tracking branch 'upstream/master'