Fix ActivityEmbedding crash when process died

1. When the organizer is removed, also remove any pending event.
2. Only apply transaction when the organizer is registered.

Fix: 240628043
Test: testApplyTransaction_skipTransactionForUnregisterOrganizer
Change-Id: I24c25691fd49fd83100b7ae51ff7fbfeb39a03e9
4 files changed