Fixes #4611,#7353 - control the db_pending_migration/db_pending_seed from installer

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

Also, as part of the `foreman-rake config` calls, we ensure that the settings
are initiated before the httpd starts (preventing the race-conditions
happening when the httpd and rake db:seed start at the same time)
why do we need noop here? wouldn't it be better to have exec in if branch?