Get hostname in $HOST or through hostname
Summary:
This covers probably more case:
- on Linux we've already $HOSTNAME
- on FreeBSD we can read $HOST
- on macOS we can call hostname
There is no need to query systemd flavour of hostname, as Linux systems
already publish the environment variable.
Test Plan: Tested on macOS
Reviewers: dereckson
Reviewed By: dereckson
Differential Revision: https://devcentral.nasqueron.org/D3162