[avalanche] Remove invalidated transactions from the mempool
Summary:
It is possible for a transaction the be invalidated when in the mempool: if 2 conflicting transactions are both rejected one of them is lastly pulled back to mempool where invalidation can happen. We need to make sure we remove such a tx from the mempool and not assume it's already been removed.
To do so we simply apply the same logic to rejection and invalidation, with the additional steps for invalidation.
Test Plan:
./test/functional/test_runner.py abc_p2p_avalanche_transaction_voting
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18569