common: Fix add_local_addrinfo
As far as I can tell add_local_addrinfo is just broken.
getaddrinfo should be returning an error always, since we've specified NUMERICHOST and are putting in a non-numeric hostname.
This commit switches out the code to use getifaddrs which seems to be the actual intention of the function.