Update counter cache when pushing into association

This commit fixes a regression bug in which counter_cache columns
were not being updated correctly when newly created records were
being pushed into an assocation. EG:

    # this was fine
    @post.comment.create!

    # this was fine
    @comment = Comment.first
    @post.comments << @comment

    # this would not update counters
    @post.comments << Comment.create!
also assign nil in dirty nullable_datetime test. #10237
Merge pull request #10292 from matthewrobertson/fix-update-counter-cache-on-push

Update counter cache when pushing into association
Merge pull request #10295 from senny/10237_dirty_with_nullable_datetime

Also assign nil in dirty nullable_datetime test. Closes #10237
Created a registry based on the +PerThreadRegistry+ module for
subscriber queues. Helps limit the number of thread locals.
Merge pull request #10285 from wangjohn/subscriber_registry

Created a registry for ActiveSupport::Subscriber queues
Return a 405 response for unknown HTTP methods
Merge pull request #10299 from econsultancy/use-method-not-allowed-exception

Use MethodNotAllowed exception rather than UnknownHttpMethod
remove redundant variable
Merge pull request #10302 from vipulnsward/remove_redundant_var

Remove redundant variable
extract arrays to constants in Mapper
Merge pull request #10301 from vipulnsward/extract_in_mapper

extract arrays to constants in Mapper
applies documentation guidelines
ActiveRecord -> Active Record
Adjust for daylight savings in String#to_time

The changes in b79adc4323 had a bug where if the time in the String
was in standard time but the current time was in daylight savings then
the calculated adjustment was off by an hour.

This commit fixes this and adds extra tests for the following:

* time in string is standard time, current time is standard time
* time in string is standard time, current time is daylight savings
* time in string is daylight savings, current time is standard time
* time in string is daylight savings, current time is daylight savings

Fixes #10306.
When empty options passed to having clause having_values was [nil] but should be empty.
refactor initialization of array
Merge pull request #10318 from vipulnsward/refactor_obvious

refactor initialization of array
Merge pull request #10317 from arabonradar/ar_having_values_bug_fix

ActiveRecord having clause bug fix
Revert "`belongs_to :touch` behavior now touches old association when transitioning to new association" until a proper fix is found for #10197