Here's a quick change to remove a dependency on the checkpoints.
A new configurable option, -checkscriptnewer (with a default of 30 days specified in seconds) is created. It allows bypassing the checking of scripts in blocks that are older than the configurable time. This was mentioned at #7591 (comment) and this is an attempt at doing it. The old override, -checkpoints, still works with this.
Also, this fixes a minor bug with the current script checking dependency on checkpoints. The current checkpoints impl does not skip all the signature checking for pre-checkpoint blocks in some cases. For example, during headers-first IBD, it is a race between how fast the header chain is built relative to the next checkpoint available and how fast the block responses come in from async block requests. Once a checkpointed header is sync'ed, then all blocks before it will skip signature validation, but before that happens, sig checking is on. Yeah, like I said, it's minor.
Also, this pull shares some ideas with previous work https://github.com/bitcoinclassic/bitcoinclassic/pull/143, but I decided to use a configurable option.