Add support for duplicate shard states in BaseShardManager

This fixes an issue where a connection is not registered if it has multiple ShardState entries.
Also, you need to check for the inconsistent state (i.e., address is the same, but state is different)