start factoring out the replication protocol client.

Also, some usable comments.
Factor HDRJ parsing.
Disambiguate HRDJ event names.

insert/update/delete are now reserved for events coming off the stream
change is reserved for client code that just wants a hook for re-rendering.