move resolve_host from tcp.c to os_support.c as it is used widely