Refactor of ::Rails module

1. Used ActiveSupport::Autoload to dry-up the autoload definitions.
2. Used ActiveSupport's delegate to dry up the application proxied
   attributes.
3. Did a little white space change on Rails.groups.
Merge pull request #10915 from gsamokovarov/railties-autoloads

Refactor of ::Rails module