change DNS forwarding behavior to match standard resolver

Instead of choosing random dns resolvers, try each one, in order, until
the retries are exhausted.  This more or less matches the C resolver
library behavior.