Make console and generators blocks works at Application instance level

Like rake tasks and runner blocks these blocks should also being shared
between applications since they are stored at the classes.

Fixes #14748

Conflicts:
	railties/test/application/configuration_test.rb