Python3 support

I'm working on Python 3 support.
This pull request is not ready yet.

First I need to see how tests run with Travis (I wasn't able to run them on my fork) :)