Refactor join_keys to remove complex conditionals

Pushing conditionals down to through reflection

Only the through association needs the part of this conditional
that deals with belongs to and polymorphic? so that can be pushed
down into the ThroughReflection reducing the conditionals.

Remove conditional because we can delegate join keys to source reflection

Remove need for source_macro checking

By adding join_id_for to the other reflections we remove the need
to cehck against the source_macro and can reduce the conditioanl
from the original join_id_for(owner)

Using polymorphism instead of testing the source_macro

This case statement in join_association is almost exactly the same
as the original join_keys code. Testing taht theory by creating a
new join_dependency_keys(assoc_klass) method.

Refactor join_keys further to be more concise

Fixed format of "#:nodoc:" to "# :nodoc:" where I added them to this
file.
Merge pull request #16353 from eileencodes/refactor-join_keys-usage-in-reflection

Refactor join_keys to remove complex conditionals