Compute host's FQDN on Demand

Call to socket.getfqdn takes quite a lot of time on systems that don't have a fully qualified domain name. This patch makes the call happen only when it is explicitly required. On my systems the speed difference is very significant.