Fix deleting memberships on workgroup destroy

When a group will be deleted (not marked as deleted), it should remove belonging memberships as well. Also added a migration clean up task to remove all broken memberships.