misc: fixed truncated IP addresses set in $HOST

In case getnameinfo() fails to resolve an address, it automatically returns
the numeric IP address without setting an error condition, which messes up
the logic in resolve_sockaddr() and causes the IP address to be truncated if
use_fqdn() is set to no.  This patch instructs getnameinfo() to return
failure instead by passing NI_NAMEREQD in flags.

References: bugzilla #240
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>