(PDB-954) Support a fallback database

This commit moves from a combo 'server' and 'port' config to a
'server_urls' config that contains the full path to one or more PuppetDB
URLs. The old server/port format is still supported (internally it is
converted to a URL to conform with the new syntax).

This commit also supports a new 'server_url_timeout' config. If the
PuppetDB instance has responded in the specified number of
seconds (defaults to 30) it will fail and roll to the next PuppetDB
url (if one is provided).
Merge pull request #1129 from wkalt/ticket/master/pdb-954-fallback-acceptance

Ticket/master/pdb 954 fallback acceptance
Switching RPM/DEB package to use globbing on terminus directories
Merge pull request #1131 from senior/ticket/master/pdb-100-packaging-for-new-rb-files

Switching RPM/DEB package to use globbing on terminus directories
(maint) fix broken package tests

This updates the install_puppetdb_termini function called during package
acceptance tests to use server_urls
Merge pull request #1133 from wkalt/maint/fix-fallback-pkg-test

(maint) fix broken package tests
DOCUMENT-211: Switched greater than / less than operators

The greater than or equal to (>=) and less than or equal to (<=) signs were swapped. Now they aren't.
Merge pull request #1136 from jbondpdx/docfix

DOCUMENT-211: Greater than or equal to and less than or equal to swapped
Merge branch 'stable'

* stable:
  DOCUMENT-211: Switched greater than / less than operators
(PDB-898) Add factset hash to replace-facts!

This commit associates a hash of each factset with the metadata of the factset
to allow us to easily tell if fact values have changed.
(PDB-880) Errors on PDB shutdown

This patch bumps activemq to 5.7.0.  This seems to prevent two errors that
would sometimes occur on shutdown, one where the broker was stopped before its consumers
were removed and another where KahaDB batching fails to reset due to the PageFile
not being loaded.
Merge pull request #1132 from wkalt/ticket/master/pdb-898-replace-facts-factset-hash

(PDB-898) Add factset hash to replace-facts!
Merge pull request #1137 from wkalt/ticket/master/pdb-880-shutdown-exceptions

(PDB-880) Errors on PDB shutdown
(PDB-897) Create new message listener TK service

This commit refactors our current command code to allow message
listeners to be register via TK service on startup. The new message
listener service handles spawning threads to listen to the queue and the
plumbing of pulling a message off the queue, putting it back on in the
case of failure etc. The new message listener service consumes the MQ
config from the PuppetDBServer service. The functionality of the server
service is the same, but previously didn't expose a protocol. It now
needs to expose one so that the message listener service can be sure it
has started before it starts. The code handling the commands registers
itself with the new message listener service but is unchanged beyond
that.
(maint) Allow factset hashes to be nil in db

This is necessary for factsets to function after the PDB-898 migration,
since existing factsets are not being hashed.
Merge pull request #1140 from wkalt/maint/make-factset-schema-nullable

(maint) Allow factset hashes to be null in db
Merge pull request #1138 from senior/ticket/master/pdb-897-tk-message-listener2

(PDB-897) Create new message listener TK service
(PDB-911) change to TK WebroutingService

This commit switches us from the TK WebserverService to the TK
WebroutingService. This will allow us to attach commercial-only routes by
modifying the config file before consumption by TK.
(PDB-1012) WIP Make spec tests use correct Puppet version

This patch parameterizes the branch of puppet our Gemfile installs so that we
can use specific puppet versions in our spec tests.
(PDB-1011) Allow querying of PDB directly via a TK service

This commit adds a function to the PuppetDBServer service to execute a
query and return the results as a Clojure data structure (rather than
streaming JSON over HTTP). A function can be passed in that will accept
a lazy seq to consume the rows