Update the way we remove major components to work with Rails 4.

And don't try to configure components that we have removed.
Move sample database config instead of copying it.