The Murch-Zawy rule introduced in #35949 (for the miner, not for consensus) adds yet another constraint to the timestamp for our block templates.
This PR adds test coverage for what happens in the (extremely unlikely) event that the miner can't satisfy the constraints.
The test has an attacker mine 6 blocks at the end of a difficulty adjustment period, which set MTP at the victim's future-time limit. It calls getblocktemplate and the equivalent IPC method, which both fail. It then moves mock time one second forward, and demonstrates mining works again (and we don't drop the IPC connection).
This attack is impractical, but the code is reachable, so deserves a test.
The first commit fixes the incorrectly named REGTEST_RETARGET_PERIOD. The second commit moves (actually) DIFFICULTY_ADJUSTMENT_INTERVAL to the framework, so the next two commits can use it. The third commit is a test followup suggested in #35949 (review). The fourth commit contains the new test.