(PDB-898) Add factset hash to replace-facts!

This commit associates a hash of each factset with the metadata of the factset
to allow us to easily tell if fact values have changed.
I don't understand the switch in this logic. Can you explain it?