Fix memory leak in work_comparator_tests.cpp
Summary: The CBlockIndex are never freed.
Test Plan:
Build with asan, then:
./src/test/test_bitcoin -t work_comparator_tests
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3568