Notes:
- InvalidChainFound was already moved to CChainState in D7573
- CheckForkWarningConditionsOnNewFork was removed by core in core#19905 because it doesn't work, but in Bitcoin ABC it was fixed in D1950.
This is a backport of core#21055 [8/16]
https://github.com/bitcoin/bitcoin/pull/21055/commits/8b99efbcc08ab41caf657c6d730a27e6a91bc356