Fix crash when inserting reminder/attendee/extended property to a non-existent event

The problem is when inserting reminder/attendee/extended property, the code assumes the event it belongs to exists.
However, it may not be true in some edge cases.
For example, user is on the event edit page, while the event is being deleted in server at this moment.

Add checking to confirm the event does exists before having the insert logic.
As all logics in insert is run within a single transaction, we can be assured that the event does exist throughout the transaction.

Bug: b2/13287671

Change-Id: I655720c67ab3176d52759c43032682874aa3eb8b
3 files changed