Add an after_bundle callback in Rails templates

The template runs before the generation of binstubs – this does not
allow to write one, that makes an initial commit to version control.
It is solvable by adding an after_bundle callback.
Fixed #select form builder helper to support block with html output
Add after_bundle to the release notes and upgrade guide
no reason to lazily instantiate the routes

especially if you're just going to add a call two lines down that
populates the cache. common.
a rails application should be an engine subclass
call the routes method on engines

if we access the instance, we can free up lots of codes
Revert "Revert "Merge pull request #15394 from morgoth/fix-automatic-maintaining-test-schema-for-sql-format""

This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
schema rake tasks are specific about the configuration to act on.

The rake tasks and the `DatabaseTakss` adapter classes used to
assume a configuration at some places. This forced the rake
tasks to establish a specific connection before calling into
`load_schema`.

After #15394 this started to cause issues because it could
`purge` the wrong database before loading the schema.
Merge pull request #16316 from rails/senny/purge_schema_maintenance

purge database before loading schema, take 2
Merge pull request #16359 from skanev/after-bundle-in-rails-templates

Add an after_bundle callback in Rails templates

Conflicts:
	railties/CHANGELOG.md
Merge pull request #16402 from bogdan/select_with_empty_block

Fixed #select form builder helper to support block without html output
defined? should actually work in current implementation

So this trick is not needed to be documented anymore.