i apologize to anyone looking at this commit and wondering why i would
do this, but all these little "off" formatting things have been bugging
me all day while looking at this code. i simply had to do something.
up until now, a single event handler "on-session" could be provided to
wrap-browserchannel which would be invoked each time a new client
session was created. it was then the application's responsibility to
register listeners for close/receive events inside this on-session event
handler.
this was kind of clunky honestly. basically every application would want
to use all of these events, so why not reduce the boilerplate needed?
this change makes it so a map of event handlers (:on-open, :on-close and
:on-receive) can be passed under wrap-browserchannel's options map (in
the key :events). this makes it simpler for an application to set up
browserchannel event handlers, and it works in basically the exact same
way as the clientside event handler registration works right now