Python 3 fixes.

The command used was:
2to3 -j 8 -w \
-f buffer \
-f idioms \
-f set_literal \
-f ws_comma \
-x except \
-x import \
-x imports \
-x long \
-x numliterals \
-x xrange \
.

The compat.py and multi/processor.py files were reverted prior to committing.