Fix cascading delete for contents and groups
Delete event handling for the interaction between groups and their contents was broken:
- Deleted contents' IDs were not removed from their group.
- Deleted groups did not trigger a delete of their contents.
Closes: #186 (closed)
Regression-MR: !590 (merged)