Fixes #6566 - If the certname does not match the hostname, nil the certname

Resolves http://projects.theforeman.org/issues/6566 by generalizing the solution from http://projects.theforeman.org/issues/3222
Nitpick, we should probably change this log message to say something like: `"Removing old certificate value #{certname} for host #{name} as it's out of date"`