Add __future__ imports

This moves us towards Python 3 (#225). Most of the work here is in cleaning up our usage of bytestrings and unicode.