RequestServer: Replace use of gethostbyname with getaddrinfo
On non-Serenity systems that support IPv6, using gethostbyname is an anti-pattern that distros such as SUSE and Red Hat have been trying to eliminate.
In ConnectionFromClient::ensure_connection, we use gethostbyname to ensure that a DNS lookup is performed for the ResolveOnly cache level.
https://github.com/SerenityOS/serenity/blob/3a820ddbdfd53a5627903715e7c5a51f998c0845/Userland/Services/RequestServer/ConnectionFromClient.cpp#L149-L154
Replace this usage of gethostbyname with one of getaddrinfo or the LibCore equivalent that will also force the host system to perform a DNS lookup.
cc @alimpfard
:thinking: is there something wrong with gethostbyname (aside from not supporting ipv6, which is probably not supported by the rest of the stack anyway)?
The change would be good for when RS (and serenity) gains support for ipv6 though, so :+1:.
The OpenSUSE guidelines link to a post by Ulrich Drepper (of all people :thinking: ) explaining why it's not great on IPv4 networks either, when a host has both an internal and an external IP address. gethostbyname just returns one at random, while getaddrinfo has a spec mandated order.