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)
Not sure if this will give an error if the user isn't using passenger.