Change name of fact-nodes operator to fact-contents

Signed-off-by: Ken Barber <ken@bob.sh>
Deprecate PG 9.1 instead, and remove nagging about 9.3 for PE users

This changes the deprecation to 9.1 and below. It also removes the nagging about
upgrading for PE users, who will still be on 9.2 it looks like.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1063 from kbarber/maint/master/rename-fact-nodes-endpoint

Change name of fact-nodes operator to fact-contents
(PDB-810) Load test structured facts indices.

This patch addresses some performance issues for structured facts

- changes a coalesce that was causing the value_integer and value_float indices
  to be disregarded.  They are verified to work.

- deletes the index on fact path depth, since it was not getting used.

- creates a trgm index on fact_values column value_string, so that our trgm
  indexes are now on fact_paths and value_string. This greatly speeds
  up queries on value_string and only moderately affects the table size. See
  https://gist.githubusercontent.com/wkalt/42792c53a5dc9f0840c4/raw/29f261316bc7e39d888250401f0b1f1c8c28a87b/gistfile1.txt
  for some comparisons on a 2000 node dataset with 100 facts per node.

- put a DISTINCT clause in our garbage collection on fact_paths.  This incurs a
  minor performance cost in small datasets, but yields a tremendous benefit in
  large and highly duplicated sets by reducing the load on the accompanying IN.

- changes stringified numerical comparisons on the lower endpoints to use
  bigints instead of ints.  Changes the /v4 endpoint to make the equality
  operator type sensitive, i.e a value query for "24" will not match 24 like it
  does on the lower endpoints. Inequality operators will also fail on strings.

- adds some rough load testing fuctions to benchmark.clj

- all structured facts indices have been verified to work.
fix factsets docs typo
(PDB-783) Release notes for PuppetDB 2.2.0

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1065 from wkalt/ticket/master/pdb-810-analyze-indices

(PDB-810) Load test structured facts indices.
Merge pull request #1060 from kbarber/ticket/master/pdb-783-release-notes-for-220

(PDB-783) Release notes for PuppetDB 2.2.0
Merge pull request #1064 from kbarber/maint/master/change-postgresql-deprecation-version

Deprecate PG 9.1 instead, and remove nagging about 9.3 for PE users
Merge pull request #1066 from wkalt/maint/master/factsets-docs-correction

fix factsets docs typo
Merge branch '1.6.x' into 2.0.x

* 1.6.x:
  (docs) Port recent docs revisions to 1.6.x branch

Conflicts:
	documentation/api/query/v1/resources.markdown
	documentation/api/query/v2/fact-names.markdown
	documentation/api/query/v2/facts.markdown
	documentation/api/query/v2/metrics.markdown
	documentation/api/query/v2/nodes.markdown
	documentation/api/query/v2/operators.markdown
	documentation/api/query/v2/query.markdown
	documentation/api/query/v2/resources.markdown
	documentation/api/query/v3/catalogs.markdown
	documentation/api/query/v3/nodes.markdown
	documentation/api/query/v3/query.markdown
	documentation/api/wire_format/catalog_format_v1.markdown
	documentation/release_notes.markdown
(maint) Remove duplicate line after merge up

Signed-off-by: Ken Barber <ken@bob.sh>
Merge branch '2.0.x' into stable

* 2.0.x:
  (maint) Remove duplicate line after merge up

Conflicts:
	documentation/api/query/v3/catalogs.markdown
	documentation/api/wire_format/catalog_format_v1.markdown
Merge branch 'stable'

* stable:
  (maint) Remove duplicate line after merge up