Fixes #34190
When networkactive=0 is set, NAT-PMP port mapping and Tor control connections
still run in the background, mapping ports and logging retry attempts despite
the node being “inactive.”
This wires both subsystems to CConnman::SetNetworkActive so they start and stop with the network state:
-
mapport: EnableMapPort is injected as a callback via CConnman::Options. SetNetworkActive and SetMapPortEnabled both gate on network state.
-
torcontrol: is injected similarly. The callback dispatches onto the tor event loop via event_base_once to respect thread ownership.
EVLOOP_NO_EXIT_ON_EMPTYis used to keep the event loop alive without keepalive timers, so the controller starts disconnected and waits for CConnman::Start() to signal.