Change from `map` => `map!` and `collect!` to save creation of extra array.
Remove duplication from date_time calculations

Methods: :past? and :future? are already defined identically
in date_and_time/calculations.rb which is included in Date.
Because DateTime is a subclass of Date, it can call them.
Merge pull request #11678 from vipulnsward/helper_destructive

Change from `map` => `map!` and `collect!` to save creation of extra array
Merge pull request #11681 from gzohari/pr-refactor-date-time

Remove duplication from date_time calculations
Moved README into action_view [ci skip]
Refactor Date, Time, DateTime timezone methods

Similar implementations of #in_time_zone exists for Date, Time and DateTime so
method is extracted into its own module. Also some logic is extracted into
private method.
use bind values for model types
Merge pull request #11686 from gzohari/pr-refactor-time-datetime

Refactor Date, Time, DateTime timezone methods
push some validation up to the factory method
we should not allow invalid objects to be constructed
pass the mixin in to the code generation methods
no need to to_sym
callback should always have a value
Revert "all `scope_chain` methods allocate new arrays, no need to dup"

This reverts commit 1468a4b89aa4bca99160bfa03572b2c0ab348db5.
do is_a? tests on assignment so runtime is faster
oops! :bomb:
Merge pull request #11689 from arunagw/readme-updated-av

Moved README into action_view [ci skip]
A failing test which shows that when a collection association
is accessed before saving the owner, the proxy caches the #bind_values
from before the owner being persisted.

This causes calls like: owner.association.update_all to behave unexpectedly
in this case, because they try to act on association objects where
owner_id is null.

This is related to #bind_values being set on first access at:
https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/collection_proxy.rb#L37

more evidence here: https://gist.github.com/Empact/5865555
```
Active Record 3.2.13
-- create_table(:firms, {:force=>true})
   -> 0.1371s
-- create_table(:clients, {:force=>true})
   -> 0.0005s
1 clients. 1 expected.
1 clients updated. 1 expected.
```

```
Active Record 4.0.0
-- create_table(:firms, {:force=>true})
   -> 0.1606s
-- create_table(:clients, {:force=>true})
   -> 0.0004s
1 clients. 1 expected.
0 clients updated. 1 expected.
```