Fix changeset handling for new documents

When changing a newly persisted document within onFlush(), recomputing the
changeset for this document will cause a documentUpdate to be created. As a
result, events will be triggered for persist and update at the same time, even
though only a persist happened.