Add notification support

I think there is a memory leak, or maybe I'm missing something in the diff.

clients have channels pushed onto them (why is it not called `channels`?), but they are only deleted on error, I can't see where a normal close of a client's connection is causing the channel to be removed from the clients list, so it looks like the array will grow indefinitely. Am I missing something?