Race-condition in EntityCapabilitiesManager when deleting user
When a user gets deleted, the `userDeleting` event handler in `EntityCapabilitiesManager` is designed to remove all of the user's capabilities from the `entityCapabilitiesUserMap`. It does so by
looking up the matching keys (see if the full JID keys match the user's bare JID), followed by
a removal of the matching entries.
Finally, a check is preformed to see if the 'ver' hash that was associated with them remains in use (by unrelated entries). If not, that can be removed too.
There is a race condition where between 1 and 2, another event might modified the map. For example, deleting a user can go hand-in-hand with sending an unavailable presence for that same user, causing another thread from removing an entry from the map. This can lead to situations where the second step results in a `null` value being passed to the third step, which will then throw a NullPointerException (as it does not allow for null arguments to be used.