[lldb] Fix the SocketTest failure on unsupported hosts (#118673)
The test `SocketTest::TCPListen0MultiListenerGetListeningConnectionURI`
is failing on hosts that do not map `localhost` to both an ipv4 and ipv6
address. For example this build
https://lab.llvm.org/buildbot/#/builders/195/builds/1909.
To fix this, I added a helper to validate if the host has an /etc/hosts
entry for both ipv4 and ipv6, otherwise we skip the test.