[bitcoin] Merged PR from ajtowns: versionbits refactoring https://github.com/bitcoin/bitcoin/pull/29039
[bitcoin] Merged PR from ajtowns: versionbits refactoring https://github.com/bitcoin/bitcoin/pull/29039
Hope to expose this in the kernel API eventually.