Change getaddrinfo(host::AbstractString) to work with ipv6 localhost string "::1" (#36029)
* fix getaddrinfo(host::AbstractString) to work for ipv6 hostname
* fix getaddrinfo add tests
* clean up getaddrinfo
* when getaddrinfo gets passed localhost choosing the ipv6 instead ipv4 result causes the tests to fail
* fix downstream test