[chronik] better use the merkle tree cache
Summary:
The current logic is wrong, we only use the cache when computing a merkle root for a block height lower than the previous highest one, i.e if the cache contains all or more intermediate hashes than we need.
With this change, we now use the cache even if it provides only part of the intermediate hashes.
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16800