The PR discussion should be used only for technical review of the code. Please discuss the merits of this consensus change on the bitcoin-dev ML.
This PR is only changes to the consensus code. Mining code, and some RPC calls, will also need updating for the new rules should this protocol change be accepted.
As this is would be a hardfork, the mainnet BIP9 deployment must not be defined without consensus from the Bitcoin community. (This PR does not define it.)