Add support for Python 3

Just as indicated, most of the code can be ported to python 3 using 2to3. There are some differences in the ast and operator packages that need to be ironed out, though. The unit tests passed with python 2.7.7 and python 3.4.1, but some more testing might be appropriate.