Jko/record events

Event recording. Uses a model that's very similar to the Java SDK.
we can probably release `ep.mu` here, right? we don't need to hold it while sending the data.  Especially since new events can't be queued while the lock is held?