[avalanche] Use block index instead of blockhash for adding contenders to the cache
Summary: This will facilitate adding block height to the cache per feedback in D16782. While the existing API is not cumbersome in practice, it is more error prone when writing tests.
Test Plan:
ninja check-avalanche
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D16793