entity edit: send flush before sending activity, like it's done in entity_new

edit on an object is complete only after flush events handlers (if any) have been called.