[avalanche] Make the proof comparator able to work with proofs and proof pointers
Summary:
As suggested by @deadalnix https://reviews.bitcoinabc.org/D10342#inline-48629, this makes the comparator more generic and is basically free.
Because the unit test uses shared pointers, there is no loss of test coverage.
Ref T1854.
Test Plan:
ninja all check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Maniphest Tasks: T1854
Differential Revision: https://reviews.bitcoinabc.org/D10355