schema loading rake tasks maintain database connection for current env.

[Joshua Cody & Yves Senn]

Closes #16757.

Prior to this patch schema loading rake tasks had the potential to leak a
connection to a different database. This had side-effects when rake tasks
operating on the current connection (like `db:seed`) were chained.

Conflicts:
	activerecord/CHANGELOG.md
	activerecord/lib/active_record/tasks/database_tasks.rb
	activerecord/test/cases/tasks/database_tasks_test.rb