Added clause to HibernateEventWriter that updates the on-the-wire event
with the database ID of the persisted event. Fixes the smoke test. Added
unit tests that check this condition.