scope_chain should not be mutated for other reflections

Currently `scope_chain` uses same array for building different
`scope_chain` for different associations. During processing
these arrays are sometimes mutated and because of in-place
mutation the changed `scope_chain` impacts other reflections.

Fix is to dup the value before adding to the `scope_chain`.

Fixes #3882.
Minor Refactoring to `NumberHelper#number_to_human`

* Use destructive `map` and `sort_by` to save extra object creation.
* Create `INVERTED_DECIMAL_UNITS.invert` constant instead of repeatedly doing `DECIMAL_UNITS.invert`
Fix `singleton_class?`

Due to changes from http://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39628 current `singleton_class?` implementation fails.
Changed based on reference from http://bugs.ruby-lang.org/issues/7609
Remove size alias for length validation

Removed ```The `size` helper is an alias for `length`.``` line. If you use this "nonexist" helper, you will get an error message like this: 

```
ArgumentError: Unknown validator: 'SizeValidator'
...
```

Maybe wanted to mean ```validates_size_of``` helper as an alias for ```validates_length_of``` helper.
Merge pull request #12532 from vipulnsward/singleton_class

Fix `singleton_class?`
Merge pull request #10538 from neerajdotname/3882

scope_chain should not be mutated for other reflections
only calculate offset index once. #12537
the preloader for the RHS has all the preloaded records, so ask it
simplify populating the ordering hash
Merge pull request #12536 from sbagdat/patch-1

Remove size alias for length validation
we should have unique sponsorable ids in the fixtures at least
read the association instead of sending
Merge pull request #12534 from vipulnsward/minor_number_helper_perfs

Minor Refactoring to `NumberHelper#number_to_human`
Added --model-name option scaffold_controller_generator.
Merge pull request #11432 from yalab/generate_model_name_option

Add --model-name option into scaffold_controller generator
Prepare generated Gemfile for Capistrano 3

Capistrano 3 is now rails-less, so we need to encourage developers to use capistrano-rails gem.

More details: http://www.capistranorb.com/documentation/frameworks/ruby-on-rails/

[ci skip]
Add missed require making `enable_warnings` available
Merge pull request #12543 from route/missed_require

Add missed require making `enable_warnings` available
Merge pull request #12524 from kirs/patch-1

Prepare generated Gemfile for Capistrano 3