Make sure clients only get one copy of each message.

When a client is subscribed to channels like /foo/* and /foo/bar, and a
message is published to /foo/bar, the client should only receive *one*
message. Previously, we were sending the message for every shard each
subscribed channel lived in. (So if /foo/* was in shard1 and /foo/bar
was in shard2, the subscriber would get two copies.)

This change collects all the client ids from all shards and only sends
one message to each client.