OF-2381: Prevent high-frequency MUC ghost detection pings
When an occupant of a MUC room is inactive, Openfire can send it pings to see if it is still alive.
The existing implementation would generate a ping during each periodic check, after an occupant was inactive, which is to frequent. Subsequent pings should not be sooner than the configured allowed idle time.
OF-2381: Check for activity before kicking ghost MUC user
MUC Ghost detection uses an IQ Ping to determine if an occupant is a ghost and should be kicked.
Prior to this commit, unanswered Pings always resulted in a kick, which proves to be overzealous:
- if the ping was not answered, but activity since the ping request was detected (eg: the client reconnected), there's no need to kick the occupant.
- if the ping was not answered, but the occupant is no longer connected to the local cluster node, there should be no kick. If the occupant is still connected, then it likely reconnected to another cluster node.
OF-2381: Cancel pending Ping when MUC occupant disconnects
When a MUC occupant disconnects, a pending ghost detection ping task should be aborted. This reduces the chance that a lingering task incorrectly removes a reconnected occupant.