fixes #8381 - do not use a timeout for rake apipie:cache

(cherry picked from commit aa72cd99099d9b24424b51c1432742c129f29fa5)
Fixes #4611,#7353 - control the db_pending_migration/db_pending_seed from installer

This allows tracking the state of migration/seeding in the database
and making sure the rake tasks are done on subsequential installer attempts when
something goes wrong the first time.

Also, as part of the `foreman-config` calls, we ensure that the
settings are initialised before the httpd starts (preventing the
race-conditions happening when the httpd and rake db:seed start at the
same time)

Closes GH-225

(cherry picked from commit dcde67122d8151e16b905201196a764671f0d63d)
Fix command execution compatibility with Puppet < 3.4

Closes GH-252

(cherry picked from commit 30b7d48e9abe5381bf0c62a62d55e4b55d31c202)
[plugins:puppetdb] Fix debian package name

As it can be seen in

http://deb.theforeman.org/dists/plugins/nightly/binary-amd64/Packages

the package is ruby-puppetdb-foreman, hyphenated as all other foreman
plugin debian packages.

Fixes GH-256

(cherry picked from commit aec625956a9c560ba2237a16ec587824c53cf7ec)
Release 2.3.1
remove deps on Class['::puppet::server::install'].  Will just handle in
the caller.