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
extract no content response codes to a constant
Merge pull request #10297 from vipulnsward/dont_mutate_in_rack_response

extract no content response codes to a constant
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