(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
PDB-70 Add index on catalog_resources.exported

This increases performance for exported resource collection queries. For
postgresql the index is only a partial on exported = true, since indexing on
the very common 'false' case is not that effective.

Signed-off-by: Ken Barber <ken@bob.sh>
Added a new Troubleshooting Low Catalog Duplication guide and other docs
for the new catalog hash debugging feature
Added warnings when catalog hash debugging is enabled
Changed catalog debugging paths to be platform agnostic.

Updated storage.clj clojure docs to include ctalog-hash-debug-dir info

Refactored generated-stream/generated-string usage to default the date-format
and pretty print settings
Fix cli with no argument handling

Seems the cli.tools 0.2.2 library decided to change its API and is now
not returning nil valued entries when there is no default. This has played
havoc with our required-args detection, meaning that when you attempt to
call a command without any arguments you get a nasty exception.

This patch fixes this, and adds acceptance tests to ensure we don't regress.

Signed-off-by: Ken Barber <ken@bob.sh>
Moved hash debugging fns to the scf/hash_debug.clj
Merge pull request #747 from kbarber/ticket/master/PDB-70-index-on-the-exported-column

PDB-70 Add index on catalog_resources.exported
Merge pull request #751 from kbarber/maint/master/1.5.x/cli-with-no-args-broken

Fix cli with no argument handling
(PDB-56) Gzip HTTP responses

This patchset enables Jetty's gzip filter, which will automatically
compress output with compressible mime-types (text, JSON, etc).
Rename "defaults" to better reflect intent
Added an acceptance helper method for getting the vardir
Documentation changes - added a catalog debugging example and another
performance related FAQ
Changed the names of the catalog debugging files from new/old-catalog.* to catalog-new/old.*
Updated the catalog hash debugging code to use the same UUID for all 5 generated files for a given host
Munge the edge relationships and resource parameters to make diffing the
EDN files easier
Minor change to an acceptance test helper method name
Replace pre/post-conditions with type hint
Merge pull request #752 from grimradical/PDB-56

(PDB-56) Gzip HTTP reponses
Added direct test of cheshire/spit-json and utils/true-str?, and some minor doc changes