Previously this was using socket.getaddrinfo() without importing socket
and causing the daemon to fail. Running in the foreground did not use
statsd thus did not attempt to resolve the statsd host which is how this
got past manual testing. Import socket to get everything working agian.
Change-Id: I280973bdcdf472736a07d19173559b062ed74d3c