Synchronize message clearing across all sessions

When a client clears a message, wait for confirmation from the server
and then get rid of it. This confirmation will be received by all subscribers.