tests: Add tests for gethostbyname2_r, IPv4 and IPv6