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.
Fix microsecond precision of Time#at_with_coercion

When Time.at_with_coercion (wraps Time.at) is called with a single
argument that "acts_like?(:time)" it is coerced to integer thus losing
it's microsecond percision.

This commits changes this to use `#to_f` to prevent the problem
Retain UTC offset when using Time.at_with_coercion

The standard Ruby behavior for Time.at is to return the same type of
time when passing an instance of Time as a single argument. Since the
an ActiveSupport::TimeWithZone instance may be a different timezone than
the system timezone and DateTime just understands offsets the best we
can do is to return an instance of Time with the correct offset.

Fixes #11350.
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.
Fix simple_format output example ending tag
Merge pull request #11383 from mattdbridges/simple-format-doc-fix

Fix simple_format output example ending tag
pass arel to select_all rather than depend on method_missing
fix visibility of the relation construction methods
Remove unnecessary string interpolation

Removed from controller template of scaffold generator.
Merge pull request #11385 from MarceloCajueiro/remove_string_interpolation

Remove unnecessary string interpolation
Avoid creating an extra Range instance
Speedup String#to

Benchmark:
1000000.times { str.to(30) }
          user     system      total        real
old   0.490000   0.110000   0.600000 (  0.607374)
new   0.390000   0.000000   0.390000 (  0.387306)
Speedup AS::Inflector.deconstantize

Benchmark:
          user     system      total        real
old   0.740000   0.000000   0.740000 (  0.744358)
new   0.550000   0.000000   0.550000 (  0.553690)
Speedup AS::Inflector.camelize

Benchmark:
          user     system      total        real
old   5.960000   0.020000   5.980000 (  5.981754)
new   5.740000   0.030000   5.770000 (  5.757201)
Show real LoadError on helpers require

When helper try to require missing file rails will throw exception about
missing helper.

  # app/helpers/my_helper.rb

  require 'missing'

  module MyHelper
  end

And when we try do load helper

  class ApplicationController
    helper :my
  end

Rails will throw exception. This is wrong because there is a helper
file.

  Missing helper file helpers/my_helper.rb

Now when helper try to require non-existed file rails will throw proper
exception.

  No such file to load -- missing
Speed up AS::Inflector.underscore

Benchmark:
          user     system      total        real
old   6.090000   0.120000   6.210000 (  6.202039)
new   5.930000   0.110000   6.040000 (  6.042022)
Merge pull request #10642 from LTe/invalid-load-error

Show real LoadError on helpers require
Speed up String#truncate

Benchmark:
          user     system      total        real
old   1.550000   0.040000   1.590000 (  1.585866)
new   1.250000   0.040000   1.290000 (  1.287693)