purge database before loading schema, take 2

This brings back the behavior introduced by #15394 which was reverted with 5c87b5c

The original patch introduced regressions where the wrong database was purged before loading the schema. The rake tasks no longer open specific connections but tell `DatabaseTasks` on what `configuration` to act on.

I had to create a temporary method `load_schema_for` because `DatabaseTasks` is public API and `load_schema` needs a new first argument. After the deprecation cycle we can rename `load_schema_for` back to `load_schema`.

This functionality is required to for the foreign key support of `schema.rb`.

*I can squash the commits if necessary but wanted to have the diff to the patch explicit for the review.*