Details
Description
Currently, the check for shard version mismatch consults both the operation's state (when shardVersion parameter is attached to the command) and the connection's sharding info (when the command is run over a sharded collection).
Instead of looking up one or the other at version check time, we should consolidate the code which determines what shardVersion a request must use to happen in one place so that we can add additional checks that for example requests over sharded connections do not contain shard version.