net: Add -natpmp command line option
Summary:
This is a backport of core#18077 [9/13]
https://github.com/bitcoin/bitcoin/pull/18077/commits/a39f7336a3b493d46a4486c4c94fdca1b3151370
Depends on D12092
Test Plan:
ninja src/bitcoind -natpmp=1 src/qt/bitcoin-qt -natpmp=1
In bitcoin-qt, go to menu Settings > Options > Network, and check for a message "Options set in this dialog are overridden by the command line or in the configuration file: -natpmp=1"
In the bitcoind output, search for lines containing natpmp:
2022-09-29T14:07:00Z natpmp: The gateway does not support NAT-PMP.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12095