Add exclude_domain option to hostname segment

Provides an option to return only the hostname if an fqdn is returned by
socket.gethostname()