Add message handlers
Make external message handlers use 'custom'
Merge pull request #148 from wch/sendmessage

Add support for sending arbitrary messages to client