Implement message dispatching

dispatch() is what is ultimately responsible for calling the handlers
for each message. Arguments given to `dispatch` are passed through
to the handler with an implicit MessageEntity first argument.