perf: Custom uri.decode function

This patch replaces urllib.unquote_plus with code that is tuned for
performance, and is more robust when it comes to decoding non-ASCII
characters.