fixes #2130 - normalize_hostname appends domainname to fqdn

When the trailing part of $fqdn doesn't match $domain, the normalize_hostname
function would append $domain onto the end of $fqdn, saving the host as
$fqdn.$domain (Example: hostname.domain1.com.domain2.com).

This rename would happen if you edit a host already named 'host.domain1.com'
where a (hardcoded) certname says 'host.domain1.com' but the domain fact says
'domain2.com'.

If a hostname is supposed to follow RFC952 format, any . (dot) is only allowed
as a separator between domain parts and _not_ in the hostname part itself.
Thus if there is already a dot in the hostname we have to assume the host name
(fqdn) is already fully qualified.