[avalanche] Make sure the finalization status is maintained when a proof is promoted from dangling
Summary: Dangling proofs can be promoted to the peer set if our peers have it as per the remote proofs algorithm. But if the proof was recently finalized, the finalization status would be erroneously lost. This diff fixes this bug and demonstrates it with a test (the last assert would fail on the finalized_proof_count without the fix).
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK, bytesofman
Differential Revision: https://reviews.bitcoinabc.org/D14704