DNS seeds: wait for 5m instead of 11s if 1000+ peers are known
Summary:
If 1000 potential peers are known, wait for 5m before querying DNS seeds for more peers, since eventually the addresses we already know should get us connected. Also check every 11s whether we've got enough active outbounds that DNS seeds aren't worth querying, and exit the dnsseed thread early if so. DNS seeds: don't query DNS while network is inactive
Backport of core PR16939.
Test Plan:
ninja all check-all
Check IBD starts as expected.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8512