[avalanche] Extract a proof verification facility from the RPC
This makes it possible to reuse the verification from other RPCs and
return consistent messages. There is no change in behavior.
Depends on D9649.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1611
Differential Revision: https://reviews.bitcoinabc.org/D9646