[avalanche] Also finalize the ancestors of a transaction
Summary:
When avalanche finalizes a transaction, we want to make sure all the ancestors are final as well. This is a step toward using the radix tree of finalized transactions as a source for the block template.
Note that this diff does not add the ancestors to the list of the recently finalized items, this will be done in a later diff. This implies that the node could poll for the ancestors despite the child being final already.
Test Plan:
ninja check-all
Reviewers: #bitcoin_abc, PiRK, roqqit
Reviewed By: #bitcoin_abc, PiRK, roqqit
Subscribers: roqqit, Mengerian, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17717