After the recent refactor of GET-HOST-BY-NAME to use getaddrinfo,
these functions had multiple problems that are fixed in this commit:
- in GET-HOST-BY-NAME, freeaddrinfo was called on an unitialized
struct addrinfo if getaddrinfo failed
- error handling in GET-HOST-BY-NAME wasn't working, we were still
trying to use the error handling for gethostbyname
- GET-HOST-BY-ADDRESS still used the deprecated gethostbyaddr function