Fix polymorphic preloads on NOT NULL _type columns.

Defer to Association#klass instead of having a custom/duplicate code.
Simplify Preloader#grouped_records code.

The new method relies on AR::Associations::Association knowing about both reflection and a model class.

AR::Base#association now raises a descriptive error when trying to access non-existent associations. Previously it would blow up with a confusing NoMethodError: undefined method `association_class' for nil:NilClass.
Merge pull request #14580 from thedarkone/4-0-stable-backport-14532

Backport #14532 into 4-0-stable