If a counter_cache exists, use it for #empty?
Begin refactoring ThroughReflection

This allows us to decouple AssociationReflection and
ThroughReflection making ThroughReflection it's own Reflection
bucket in a way. The benefit of this is to be able to remove
checks against the macro's symbol for exmaple `macro == :belongs_to`.

Get all tests passing again

Some of the methods that used to be inherited from MacroReflection
through AssociationReflection were no longer getting passed through.
They needed to be duplicated into the ThroughReflection. I will
extract these out into a separate class.

Refactor shared methods into strategy object

Now that we've separated ThroughReflection and AssociationReflection
we can combine shared methods into one class to avoid duplication.

Break out class for each type of reflection

This creates a class for each reflection type (has_many, has_one,
belongs_to and habtm). We then can remove the need to set the macro
symbol in each initialization.

Tests were updated to reflect these changes because creation of
these reflections is now different.

Remove need for @collection instance var

We now define `collection?` as `false` by default and set it to
`true` in `has_and_belongs_to_many` and `has_many` reflections.
This removes the need for the `@collection` instance variable.

Raise exception on unknown macro types

We shouldn't accept just any macro when creating reflections. An
unrecongnized AssociationReflection raises an error. Tests in
`reflection_test` were updated to reflect these new changes.
`:has_and_belongs_to_many` macro tests were removed because we no
longer internally return HABTM.
Add ability to extend `rails server` command options parser

With this change it will be possible to add additional options to the `option_parser` like this:

    require 'rails/commands/server'
    module Rails
      class Server < ::Rack::Server
        class Options
          def option_parser_with_open(options)
            parser = option_parser_without_open options
            parser.on('-o', '--open', 'Open in default browser') { options[:open] = true }
            parser
          end
          alias_method_chain :option_parser, :open
        end

        def start_with_open
          start_without_open do
            `open http://localhost:3000` if options[:open]
          end
        end
        alias_method_chain :start, :open
      end
    end
Merge pull request #16089 from eileencodes/refactor-reflections-from-sub-classes-to-delegates

Refactor reflections from sub classes to delegates
[CI SKIP] Doc fix.
Log digest as :debug instead of :info
Merge pull request #16174 from tgxworld/doc_fix

[ci skip] Fix grammar of eager loading for ActiveRecord::Associations
Return an absolute instead of relative path from an asset url in the case of the `asset_host` proc returning nil
Merge pull request #16161 from jpawlyn/master

Fix empty host for an asset url when asset_host proc returns nil
Merge pull request #16175 from skorks/log_digestor_as_debug

Log digest as :debug instead of :info
Merge pull request #16142 from andreychernih/extend-server-options

Add ability to extend `rails server` command options parser
Merge pull request #15266 from dv/use_counter_cache_for_empty_call

If a counter_cache exists, use it for #empty?
Add CHANGELOG entry for #15266
Fix version detection for RENAME INDEX support. Fixes #15931.
Revert "Revert "Merge pull request #16059 from jenncoop/json-serialized-attr""

This reverts commit 6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f.

Conflicts:
	activerecord/CHANGELOG.md
Predicate methods don't need to return `true` / `false`
Merge pull request #16162 from chancancode/fix_json_coder

Fixed JSON coder when loading NULL from DB
Fixed SQL syntax for postgresql
Merge branch 'jbrowning-fix_mariadb_rename_index'

Closes #15936
Document the change in `nil` handling for serialized attributes

Also updated the test case to reflect that