Some Bitcoin activity is completely local (offline), e.g., reindexing.
The `setnetworkactive` RPC command is already present. This PR adds the corresponding command-line argument / config option, and allows to start the client with disabled p2p network by providing `-networkactive=0` or `-nonetworkactive`.
Commit message #1:
> net: Add -networkactive option
>
> The `setnetworkactive' RPC command is already present.
> This new option allows to start the client with disabled p2p network
> activity for testing or reindexing.
Commit message #2:
>net: Log network activity status change unconditionally
Commit message #3:
> test: Add test coverage for -networkactive option
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19473 | [[https://github.com/bitcoin/bitcoin/pull/19473 | core#19473]]]]