The previous behavior, skipping some L3 DisconnectBlock calls,
but still attempting to reconnect these blocks at L4, makes
ConnectBlock assert.
The variable skipped_l3_checks is introduced because even with an
insufficient cache for the L3 checks, the L1/L2 checks in the same
loop should still be completed.
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/27009 | core#27009]]
Fixes [[https://github.com/bitcoin/bitcoin/pull/25563 | core#25563]].