Add support for duplicate shard states in BaseShardManager

This fixes an issue where a connection is not registered if it has multiple ShardState entries.
Register() is a noop if the address already exists, so this isn't a problem. I agree that it's cleaner to do a state diff (e.g. with sets) in case the pool implementation changes. I'll clean this up when I get a chance.