Allowing multiple rails applications in the same ruby instance.

This change provides the ability to create a new application with a
configuration which can be specified.
Merge pull request #10099 from wangjohn/railties_each_with_config_2nd_attempt

Created way of cloning a Rails::Application instance