Implement add_listener API

Here is my take on things ;)
Not saying that your stuff is wrong or bad, it isn't, but I think my approach is a bit cleaner and more straight forward.
It's actually a lot like your code, except that
- I omitted some stuff, like explicitly counting callbacks,
- refined some things, like only processing queues once a message is fully processed,
- used some python capabilities, like `defaultdict`
- and added some gimmicks like legacy `listen(on*=)` API support.

Now the question is:
- throw away the fruits of your hard labor... well, not actually, as you learned a lot of things implementing your version, I'm sure, and the way itself is the goal
- throw away my version,
- or take best of two worlds... which IMHO is the same as taking my version, kok