Streaming fact queries

This extends the benefits of streamed resource queries to facts. This is
especially helpful for users with a large number of nodes and/or very
large custom facts; previously, a query for all facts would blow out the
heap and take down PuppetDB.
Streaming facts working with master
(packaging) (#17555) Fix issues with systemctl path in the RPM spec file

In the previous commit for this issue, the path to the systemctl utility
was incorrect in the %preun and %postun sections. Several calls were pointing
to /usr/sbin/systemctl instead of the correct path used in the rest of the
spec, /usr/bin/systemctl. This would lead to an RPM that would give errors
on uninstall.

This commit corrects the path to the systemctl utility.
Add docs for catalog and version endpoints
Add `/v3` prefix to version and server-time docs
Merge pull request #723 from cprice404/maint/1.5.x/docs-for-catalog-and-version-endpoints

Add docs for catalog and version endpoints
Merge pull request #722 from shrug/master

(packaging) (#17555) Fix issues with systemctl path in the RPM spec file
Minor changes after code review:
  - switch v3/facts to use the PL cheshire wrapper, to ensures encoders are loaded
  - Change v3/resources.clj to use json-response* similar to v2/resources.clj
  - Removed an unnecessary IllegalStateException catch in v3/facts.clj
  - Added some docstrings to testutils paged-results and paged-results*
Remove references to required 'Accept: application/json' header
Merge pull request #724 from cprice404/maint/1.5.x/fix-json-accepts-in-docs

Remove references to required 'Accept: application/json' header
Merge pull request #721 from senior/grimradical-streaming-facts

Support streaming similar to resources with facts
Merge branch '1.5.x'

* 1.5.x:
  Remove references to required 'Accept: application/json' header
  Add `/v3` prefix to version and server-time docs
  Add docs for catalog and version endpoints
Extend travis testing to test against postgres

This expands the test.sh script to accept a third element in T_TEST that
represents the database to test against.

We now launch a database (from travis services) and create a postgres db
when required.

Signed-off-by: Ken Barber <ken@bob.sh>
Fix for the current unit test hanging issue.

The current code won't close the database connection
until the HTTP response has been fully consumed. One
of the tests wasn't actually consuming the response,
causing the DB connection to stay open and then hang
on the dropping of the DB table.
Merge pull request #729 from senior/maint/master/streaming-facts-hanging-failure

Fix for the current unit test hanging issue.
Merge pull request #730 from kbarber/maint/1.5.x/travis-postgres

Extend travis testing to test against postgres
Merge branch '1.5.x'

* 1.5.x:
  Extend travis testing to test against postgres
(#22960) Don't automatically sort fact query results

Previously, we'd sort fact query results by default, regardless of
whether or not the user has requested sorting. That incurs a performance
penalty, as the DB has to now to a costly sort operation. This patch
removes the sort, and if users want sorted results they can use the new
sorting parameters to ask for that explicitly.
Fix tests that assumed ordered output
Merge pull request #727 from grimradical/dont-sort-facts-by-default

(#22960) Don't automatically sort fact query results