Bug #23: Patches for Python 3 support

* Several libraries (most notably `urllib2`) have changed names.

* `base64` is now pickier about bytes vs chars; cooperate. The code is slightly circuitous on python 2, doing an unnnecessary encode to chars before decoding to bytes again for headers, but it works.

* `print` is now a function (this breaks python2.6 support).

* dict `iteritems` is gone in Python 3. Accept the overhead of cons'ing a list on Python 2 to have Python 3 work at all.