Support for Python 3 and multiple fixes

These changes add simultaneous support for Python 2.x and 3.x. Also, multiple problems with unicode keys and cursors over HTTP are also resolved.

Fixes issue #3 and issue #4.