Merge pull request #9737 from wangjohn/counter_cache_update_attributes_fix

The counter cache will now work correctly when the foreign key is changed. Fixes #9722.
Removing the requirement that Rails::Application be a singleton, and
reworking the way the main app is initialized.
Added an instance method in rails/application that overrides the
instance method in railties. This stops you from creating a new
application whenever instance is called.
Added config to the rails application so that we don't get delegated to
the instance and go into an infinite loop.
fixed the problem with rake_tasks, now have a new problem with
initializers and Initializable.
Using instance eval instead of class_eval and creating instance methods
linking up to class methods in order to handle this.
Changing the way we handle config. The Rails.config command will create
a global config if it doesn't already exist.
Fixed the new_plugin_generator bug. Need to change it so it is fully
backward compatabile and that initialize! creates a new app and sets
Rails.application
Added an initialize! method inside the app so you can still do the old
application initialization. also added a runner.
Added lib to load path, accidentally removed this line while
refactoring.
Making small fixes in the tests to conform to the new way of
initializing applications.