Make nslookup on Windows more robust

Handle ipv6 addresses better
Less fragile parsing
Fixes #5390
Merge pull request #5559 from UtahDave/fix_nslookup

Make nslookup on Windows more robust