This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/24595 | core#24595]]
https://github.com/bitcoin/bitcoin/pull/24595/commits/deffe0df6c36225bada18603b5a840139f030f2c
https://github.com/bitcoin/bitcoin/pull/24595/commits/78adef17536edef833a0bfca06b61ce28120e486
We don't have a g_versionbitscache global, snd the point of the PR in the source material is to make that global a ChainstateManager member. The only rationale for backporting this in Bitcoin ABC is to make following backports easier (for instance in [[https://github.com/bitcoin/bitcoin/pull/25704 | core#25704]] on of the functions touched here will use the chainman argument)
Depends on D15808