Python3 support

This can replace #92 and #103 (it uses some work from both of them).  In addition to the basic tests that have been added, I've tested this with the python driver's integration tests on python 2.7 and 3.3.