Use twisted to process events and remove qtreactor.

Also:
- improve logger format
- reorder imports