Python 3 changes

This passes tests locally on 2.6, 2.7, 3.3 and pypy 2.7 as single-source. However, that doesn't mean it's doing the right thing: unit tests should probably change to reflect your decisions on what the API is meant to do with string types. Also, I am not sure whether you want to try to support 3.2 or 3.1 as well. So at the moment this is meant pretty much to highlight what would be involved in a port based on master.