(#21520) Provide option for soft failure during terminus writes when PuppetDB is unavailable

This patch adds a new option 'soft_write_failure' for puppetdb.conf to change
the terminus behaviour so that if a command or write fails, instead of
throwing an exception and causing the agent to stop it will simply log an
error to the puppet master log.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #625 from kbarber/ticket/burgundy/21520-soft-terminus-write-failure

Ticket/burgundy/21520 soft terminus write failure
(PE-1240) Query support for latest-reports events

Prior to this commit, event queries returned all events for all reports.
This adds support for flagging "last-run-only" when querying to return
only the events that came from the latest report.
Cleanup; compound test for last-run-only
Change field to 'latest-report' instead of array
Merge pull request #628 from shakedown/dev/burgundy/pe1240-query-latest-reports

Dev/burgundy/pe1240 query latest reports
Introduce v3 query API endpoints

This commit introduces the v3 query endpoints.  For now, they are
all simply routing directly to the v2 endpoints; this commit is
merely scaffolding.

It also deprecates the v1 endpoints and introduces tests to
validate the deprecation warnings, and updates all acceptance tests
to use the new v3 endpoints.
Copy v2 query docs into new v3 directory

This is just a verbatim copy, to make subsequent changes
easier to see diffs on.
v3 query docs: update all occurrences of v2 to v3
Add `some-pred->>` threading macro
Add `paged-query-to-vec` fn

This commit adds a `paged-query-to-vec` function, which
accepts limit, offset, and order-by options and
wraps existing queries with extra SQL for paging
through result sets.
Added middleware for paging queries

This commit adds ring middleware that is used to parse and
validate query parameters relating to the new paging
support for our query APIs.
WIP: add general docs for paging
Remove clojureql references

* The `node` query namespace had a reference to clojureql even
  though it wasn't actually using it; removed.
* The `facts` query namespace had a few functions that were
  implemented using clojureql.  These implementations were
  going to make it harder to implement paging support for
  this endpoint, and the raw SQL implementations are not really
  any more complex; this commit refactors the namespace to
  remove the clojureql references and replace them with raw SQL.
Add paging support to `fact_names` endpoint
Add support for paging in facts endpoint