rwrap: split out a rwrap_reset_nameservers() function