[avalanche] Release the locking requirements in AvalancheFinalizeBlock
Summary:
By splitting out the staking rewards we can make the whole function require cs_main instead of having to release the lock. This makes the logic easier to reason about and will make the follow up code more robust.
There is no change in behavior.
Test Plan:
ninja check-extended
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D18414