If the upstream DNS server is not available the call to socket.getfqdn()
will block until a timeout occurs. This blocks Moonraker's event loop,
resulting in carnage.
Call getfqdn() in a thread with a timeout of 5 seconds. In addition,
only request the fqdn if the user has one or more trusted domains
configured. Finally, cache resolved FQDNs for 24 hours to limit
repeated DNS queries.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>