[net processing] Add Peer& arg to MaybeDiscourageAndDisconnect()
Summary:
Refactor only. No change in behaviour.
Partial backport of core#20721:
https://github.com/bitcoin/bitcoin/pull/20721/commits/f8b3058992b507f3a6aac9d4e2db00102ae1b197
Ref T1696.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1696
Differential Revision: https://reviews.bitcoinabc.org/D10873