fixes #2498 FactNames are not precreated

 facts.keys.dup.delete_if { |n| fact_names.map(&:name).include? n } creates a tremendous overhead on the facts import from the puppet masters, this fix simply takes the code from the original Puppet::Rails::Host. As an example, imports have gone from ~30s to ~200ms