Refactor message parsing

Message parsing now produces namedtuple instances instead of dumb
tuples. These are easier to manage than long argument lists and are
extensible without breaking client code.
Replace obsub with new simpler event.Event class

obsub added the event's class instance as an argument to every callback,
which was almost never useful. We also generally don't need each event
to be a method.