cli: simplify -netinfo using getpeerinfo network field
Summary:
This is a backport of core#20002 [3/5]
https://github.com/bitcoin/bitcoin/pull/20002/commits/5133fab37e8679e1d0d08ead4f5cccf4979dc15b
Depends on D10503
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10504