Reduce number of queries for notification access checks

If the access check relies on data that needs to be fetched from the database, `AbstractSharedUserNotificationEvent::prepare()` has only be called for the current object, not all objects which causes queries for each object separately instead of one query for all objects.