Most of this commit is pure-move. It also fixes a circular dependency and adjusts namespaces.
After this change:
- kernel/coinstats.h -> Contains declarations for:
- enum class CoinStatsHashType
- struct CCoinsStats
- GetBogoSize(...)
- TxOutSer(...)
- ComputeUTXOStats(...)
- node/coinstats.h -> Just GetUTXOStats, which will be removed as we change callers to directly use the hashing/indexing codepaths in future commits.
This is a partial backport of core#24410
https://github.com/bitcoin/bitcoin/pull/24410/commits/80970985c965f79b8c376c8a922497e385445dd8
https://github.com/bitcoin/bitcoin/pull/24410/commits/0e54456f0498e52131f8ae0c76b4dfe25f45b076
https://github.com/bitcoin/bitcoin/pull/24410/commits/f329a9298c06ffe74b9e9fbc07bfe6d282fef9cb
https://github.com/bitcoin/bitcoin/pull/24410/commits/faa52387e8e4856445b1cfc9b5e072ce8f690f36
https://github.com/bitcoin/bitcoin/pull/24410/commits/f1006875665ffe8ff5da8185effe25b860743b4e (minor follow-up to D14673)