[avalanche][trivial] Avoid repeated getId() during proof registration
Summary:
Just get the proofid once and use that instead.
There will be more callsites as the function is extended so better make it clean now.
Ref T1854.
Test Plan:
ninja check-avalanche
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1854
Differential Revision: https://reviews.bitcoinabc.org/D10762