Logout left contacts seeing the user online until the me topic idle timeout
fired presUsersOfInterest(off), and even that frame was silently dropped
for p2p routes by handlePresence's xoriginal check. MarkUserOffline now
returns the remaining session count and cleanUp notifies users of interest
immediately once it hits zero; p2p presence is delivered straight to the
contact's me topic, mirroring presSingleUserOffline. Zentao #22.
- use sentinel failover client for group message runtime when
sentinel_master_name/sentinel_addrs are configured, so seq counter
reads never hit a stale replica after failover
- re-seed missing redis seq counter from DB topic seqid instead of
trusting the caller in-memory baseline
- on unique-key conflict during async persist, re-allocate seq from DB
latest, bump redis counter and fix the idempotency record so resends
with the same client mid return the final seq
- add uk(topic, seqid) unique keys for im_messages in tenant DDL