Adapt to the PuppetDB 3.0.0 module changes

This patch fixes helper.rb so that our acceptance tests are compatible with
the new changes in the PuppetDB 3.0.0 module.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #736 from kbarber/maint/1.5.x/adapt_to_puppetdb_300_mod_changes

Adapt to the PuppetDB 3.0.0 module changes
Merge branch '1.5.x'

* 1.5.x:
  Adapt to the PuppetDB 3.0.0 module changes
Remove extraenous setup file

Through some merging mistake 15_setup_repos and 15_install_repositories became
duplicated. Deleted 15_install_repositories because the name is longer and it
has slightly older code in it I believe.

Signed-off-by: Ken Barber <ken@bob.sh>
Fix report tests to utilise postgresql 3.0.0 syntax

The syntax for creating a database was still using PostgreSQL 2.5.x syntax
and causing our tests to fail.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #737 from kbarber/maint/1.5.x/remove_duplicate_setup_file

Remove extraenous setup file
Merge pull request #739 from kbarber/maint/master/adapt-for-puppetdb-300

Fix report tests to utilise postgresql 3.0.0 syntax
(PDB-9) Improve report query syntax error handling

Return better error messages when the user queries with bad operators
or attributes
Merge pull request #735 from senior/ticket/master/pdb9-better-report-query-error-messages

(PDB-9) Improve report query syntax error handling
Merge branch '1.5.x'

* 1.5.x:
  (PDB-9) Improve report query syntax error handling
  Remove extraenous setup file
Split config related fns out of services.clj and into it's own namespace
Merge pull request #740 from senior/maint/master/services-config-refactor

Split config related fns out of services.clj and into it's own namespace
Clojure code cleanups

* Simplify nil equality check
* Use positive checks for (when ...) cases
* `repeatedly` can take a length 'n'
* Use `dec` to make this simple operation easier to skim read
* Replace a loop with internal conditional with `while`
* Use (when-not ...) for conditionals where positive-case is nil
* Use Clojure's own readable fn for equality checks with zero
* Use positive conditional checks (nil punning)
* nil equality checks can use the (nil? ...) fn
* Equality checks with zero can use the readable form (zero? ...)
* Simplify negative nil return condition by using (when ...)
Merge branch 'clojure-clean-up' into 1.5.x

* clojure-clean-up:
  Clojure code cleanups
(packaging) (#20148) Update logrotate script when appropriate

Logrotate versions > 3.8 complain about permissions unless the su directive
is explicitly set.

This commit updates the RPM and Debian package to set the su directive properly on
dists that need it (Debian >= 7, Ubuntu >= 13.04, EL >= 7, SLES >= 12, Fedora >= 16)
(packaging) (maint) Clean up the Debian rules file

Improve the use of templates to remove redundant code and improve
consistency.
testing: Improve git fetch handling to support refspec

For PR testing we need to download quite a different refspec, this patch
provides a better refspec for PR handling.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #744 from kbarber/maint/1.5.x/improve_git_fetch_for_pr_testing

testing: Improve git fetch handling to support refspec
Merge branch '1.5.x'

* 1.5.x:
  testing: Improve git fetch handling to support refspec
  Clojure code cleanups
Move catalog/resource hash computation functions out of
scf/storage.clj and into scf/hash.clj