[avalanche] Rewind Avalanche finalization if a finalized block is found to be invalid
Summary:
It is not expected for an invalid block to ever finalize but if it occurs due to a bug the node can partially recover by reverting the finalization. This leaves the door open for future Avalanche polling to switch to the correct chain.
Padding was added to BadBlock() so that the transaction passes checks in AcceptBlock and is added to the block index. There is no change in behavior for the other tests that call BadBlock().
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13063