Creating a class to handle preparing ARGV.

Before the AppGenerator is started, ARGV needs to be modified to
correctly account for some things. I'm extracting these out into their
own class.
Merge pull request #11378 from wangjohn/class_for_application_generator

Creating a class to handle preparing ARGV.
Return local time for backwards compatibility
Make sure that a joins Relation can be merged with has_many :through + association proxy

Closes #11248.