Add Python 3 compatibility

Adding Python 3 compatibility without breaking compatibility with
Python 2 (more exactly Python 3.2+ and Python 2.6, since older versions
of both major versions are much more complicated to give support).

For this we use some clever imports from __future__ library, that
emulates Python 3 behavior on Python 2. This is nice since it forces
you use to things like print() and absolute imports (that works better
than the relative import mess of Python 2).

TODO: needs to include __future__ imports on every file