Refs #3308 - Ensure plugins are installed after core

This is required for Debian as installing plugins at the same time as core (i.e apt-get install foreman ruby-foreman-templates) will break. Also helps to ensure the db has been migrated etc before plugins are installed.