Completes backport (9/9) of core PR19791:
https://github.com/bitcoin/bitcoin/pull/19791/commits/bb6a32ce9983c72afa90f41a43a47ffd703ca006
Depends on D9048.
Also moves the other Misbehaving() prototype (specific to our
codebase) as a private method.