OS-228: Improve how canary finds the hostname.

The method by which canary defines the hostname was changed to
mirror the method collectd uses. First, the short name is retrieved.
Second, a reverse-lookup is done on the IP-address, to find the
"official" name of the host, using getaddrinfo.

Change-Id: Ida44320d5cfcaf6b7077b73979149de59a43af66