Fallback to socket.getfqdn() instead of localhost

This builds on https://github.com/saltstack/salt/pull/11674