Add an event buffer for debugging

Use nrepl-log-events to control logging.
Address review comments
Ensure sent message id is logged