(22977) Add a debugging option to help diagnose catalogs for a host that hash to different values

Added a new global config parameter to allow debugging of catalogs that hash to
a different value. This commit also changes the JSON format of the catalog used
for hashing to something more human readable. The following PRs were also related
to this change:

https://github.com/puppetlabs/puppetdb/pull/743
https://github.com/puppetlabs/puppetdb/pull/740