Try alternate addresses more agressively.
PR: 158125
Submitted by: Mark Andrews <marka isc org> (with changes from me)
whois: code cleanup
Use pedantically correct types.
whois: do not clobber command-line flags when tweaking O_NONBLOCK
This can make whois fail to follow referrals when it should.
The bug was introduced in r281959.