[avalanche] Sort the stakes inside a proof
Summary:
This diff computes a stake id and use it to sort the stakes in the proof, so the proof id is deterministic for a set or stakes.
This prevents proofs from conflicting when the same set of UTXO is shuffled inside the proof.
I deliberately did not update the stake hash used for computing the signature so single stake utxos remain valid and I don't have to update all the tests.
Ref T1676.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Subscribers: PiRK
Maniphest Tasks: T1676
Differential Revision: https://reviews.bitcoinabc.org/D10076