This is a step toward removing the Chain::Lock class and reducing cs_main
locking.
This change doesn't affect behavior.
This is part [3/12] of Core PR17954 : https://github.com/bitcoin/bitcoin/pull/17954/commits/ade5f87971211bc67753f14a0d49e020142efc7c
Depends on D7865