Fixed exception reporting on Python 3
Added support for Tulip mainloop

Tulip is a pure-Python mainloop for Python >= 3.3. With Tulip, there is no
need for python-gobject.

Tulip is currently experimental, but as it is only used when gobject is not
present, supporting it shouldn't do any harm.