Python 3 tweaks

The work I did on the old branch is at https://github.com/g2p/xtraceback/tree/master+py3compat , in case there's anything else that can be salvaged (all tests passed).