Make nslookup on Windows more robust

Handle ipv6 addresses better
Less fragile parsing
Fixes #5390