Python 3 support

Mostly fixes related to integer divisions and bytes/str stricter separation.

I haven't tested this in production but I'm able to graph a whisper file in python 3, which is encouraging.
I'd rather not touch things that are not related to that pull request… Refactorings can be done separately IMO.