Added missing test case for migrations when using sql structure
Add unregister_template_handler to prevent leaks.
Fixed automatic maintaining test schema to properly handle sql structure schema format.

Additionally:
* It changes `purge` task on `sqlite3` adapter to recreate database file, to
be consistent with other adapters.
* Adds `purge` step when loading from `schema.rb`
Merge pull request #15590 from zuhao/refactor_actionview_register_template_handler

Add unregister_template_handler to prevent leaks.

Conflicts:
	actionview/CHANGELOG.md
Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format

ActiveRecord::Migration.maintain_test_schema! doesn't work with structure.sql

Conflicts:
	activerecord/CHANGELOG.md
use Ruby for mocking