If ipv6_available is set to false, filter_addrs will send ipv6 addresses
to the darklist.
This is necessary since otherwise they would be deleted by the refinery
and not propagated on the network, even if they are perfectly valid
hosts.
Once on the dark list, these addresses will not be connected to in
OutboundSession.
Note that because there may be a delay when we establish ipv6 connectivity
(since it requires Connector to fail with ENETUNREACH), there is a
possibility of the following happening:
* recv ipv6 addrs, add to greylist
* try to connect to ipv6 addr
* set ipv6_available == false
* recv ivp6 addrs, add to darklist
* we now have duplicate addrs on darklist and greylist.
This is not a problem because the refinery will eventually delete the
greylist entries and from then on the dark list will be the definitive
list for ipv6 addrs.
Previously if we didn't meet the gold count or white counts set in
settings, we would select from other lists that do not match what we
specified in the config. This feels like a side effect and in fact we
should more strictly adher to the prefereces.
If our preferences aren't met, we simply do peer discovery.
settings.white_count was 90 by default (a percentage) but was being
treated as an absolute value in outbound session.
we fix this and simplify the types to avoid excessive conversions.
This is necessary since it could be a gold or whitelist peer that hasn't
updated and so fails the version exchange. Marking a gold or whitelist
peer as Suspend wouldn't do anything since it would never make it to the
refinery.
The Error result of the version exchange was not being dealt with.
Instead we were only handling when the version exchange timed out.
There was also a bug in the handling of the failure in session/mod.rs
where the error case was similarly ignored. We now explicitly return
with an error in the case that the version exchange fails or times out.