Fixes #6566 - renaming a node does not change the certname

If use_uuid_for_certificates is true, reuse the certname UUID value.
If false, then reset the certname if it does not match the hostname.