Add a test to ensure memory isn't consumed for blocks pre-checkpoint
Summary:
This adds coverage on three test cases, where blocks are rejected and do not leak memory in the block index for all cases:
- Forks from a new genesis block.
- Forks from before a checkpoint that has been reached.
- Forks at a checkpoint.
Test Plan:
make check ninja check
Reviewers: deadalnix, Fabien, #bitcoin_abc
Reviewed By: deadalnix, Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D2729