Clean up Python 2 cruft
Continuing tornado/Python 3 fixes.