Details
Description
Once SERVER-33022 goes in, the CatalogCache will cache the databaseVersion in its DatabaseInfoEntry.
However, the CatalogCache should not be used for version checking on shards (since the version check must be done under some form of database lock and the CatalogCache refresh does not take a database lock).
Instead, we should create a DatabaseShardingState (analogous to CollectionShardingState), where we can load the databaseVersion for version checking on shards.
We should make the new DatabaseShardingState a decoration on the storage catalog's Database (rather than on the ServiceContext, as the map of CollectionShardingStates is).