Varnish URL quoting behavior.

I've analyzed what varnish is doing here, and it looks like it's
somewhat different from what python's urllib.quote() does.  So we
instead use some custom safe characters here, taken from
https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters