OF-2201: Improve error message during LDAP setup
This commit ensures that a helpful error message is shown to the end-user when setup fails due to a broken HTTP session.
OF-2205: Prevents a race condition in EntityCapabilitiesManager
The problem fixed here is most apparent when a user is being deleted, while at the same time presence unavailable for the same user is being processed.