Single codebase for Python 2 and 3

Hi @mfenniak, this is quite a big change, so I'm sending a pull request. I've made the py3 branch compatible with Python 2 and 3, and renamed it 'master' in keeping with the git convention. I've merged the trunk branch into it so we don't lose any history.

The idea behind having a single codebase for 2 and 3 is so that we don't have to make changes to two branches all the time, so it'll save a lot of effort. It should also be easier to do releases and easier for people to use the driver because they won't have to worry about Python versions.

Hope you like it!