:counter_cache option for  to support custom named counter caches. Closes #7993
Fix message about include_blank option.

See
https://github.com/rails/rails/commit/cb7d19b66badfbd1846c195913419c331701074e#commitcomment-2127148.
Add note about squashing in contributor guide.

We tell people how to do this all the time in the Issues tracker,
so now we can just point them here.
delegate PathSet's enumerator methods
Merge pull request #8152 from steveklabnik/squashing_guide

Add note about squashing in contributor guide.
Relations built off collection associations with an unsaved owner should be null relations

For example, the following should not run any query on the database:

Post.new.comments.where(body: 'omg').to_a # => []

Fixes #5215.
Merge pull request #8153 from steveklabnik/fix_include_blank

Fix message about include_blank option. [ci skip]
Merge pull request #8151 from nashby/forwardable

delegate PathSet's enumerator methods
Nullify the relation at a more general level.

This allows us to avoid hacks like the "return 0 if owner.new_record?"
in #count (which this commit removes).

Also, the relevant foreign key may actually be present even on a new
owner record, in which case we *don't* want a null relation. This logic
is encapsulated in the #null_scope? method.

We also need to make sure that the CollectionProxy is not 'infected'
with the NullRelation module, or else the methods from there will
override the definitions in CollectionProxy, leading to incorrect
results. Hence the nullify: false option to CollectionAssociation#scope.
(This feels a bit nasty but I can't think of a better way.)
CollectionProxy#pluck issues no query for a new_record? owner

Fixes #8102.

I couldn't find a nicer way to deal with this than delegate the call to
 #scope, which will be a NullRelation when we want it to be.
Delegate all calculations to the scope.

So that the scope may be a NullRelation and return a result without
executing a query.

Fixes #7928
Merge pull request #8116 from senny/7993_configure_counter_cache_for_has_many

:counter_cache option for  to support custom named counter caches
Removing duplication in callback normalization.

These two things were 100% identical.
Merge pull request #8157 from steveklabnik/remove_callback_duplication

Removing duplication in callback normalization.
Properly deprecate ConnectionHandler#connection_pools

Rather than just changing it and hoping for the best.

Requested by @jeremy:

https://github.com/rails/rails/commit/ba1544d71628abff2777c9c514142d7e9a159111#commitcomment-2106059
fix warnings
Remove not used load hooks for active_record_config

These were removed with ActiveRecord::Model in
https://github.com/rails/rails/commit/9e4c41c903e8e58721f2c41776a8c60ddba7a0a9#L15L156
Deprecate Hash#diff.

It's no longer used in Rails any more.

See https://github.com/rails/rails/pull/8142\#issuecomment-10227297 for more
Merge pull request #8158 from steveklabnik/deprecate_diff

Deprecate Hash#diff.
Gracefully handle upgrading apps with mass assigment configs

Most apps upgrading from 3.x will have options for mass assigment in
their application.rb and environments/*.rb config files. Rather than
just raising a NoMethodError when copying the config, this commit
adds a warning message until either the protected_attributes gem
is installed or the relevant config options are removed.