events: add sync event support to persist implementations (#1020)
Adds basic support for the new `#sync` event to persister
implementations. Note that the pebble persister (used in rainbow) is
agnostic to event type, so didn't need any update.
This PR is a bit drive-by: the new relay work doesn't use this copy of
the persist code, and these patches haven't been demonstrated to work.