Quote and unquote elements of requests and responses more correctly.

Specifically:
 * Construct the request message using urllib.urlencode rather that doing
   it by hand.  This saves a lot of invocations of urllib.quote and
   correctly quotes spaces.
 * Construct the "params" field of the request message using another
   instance of urllib.urlencode.  This ensures that it is correctly
   quoted.
 * When interpreting an encoded response string, pass every field
   through urllib.unquote.  This ensures that they are correctly
   unquoted.
Tests for recently-fixed quoting bugs.
Add build-dependency on python-markdown.

Required because debian/rules explicitly invokes markdown_py.