Let relationships know which table they come from.

has_many through relationships should look up their "through" relationship
on this table, not the one that they point *to*.
Move set_keys up into AbstractRelationship.

Allows construct_join_sql() to not care what type of relationship it's
working on before calling set_keys().
Fix construct_join_sql() properly.

Find the association on the correct table, and use the correct table
names and keys. Support accessing a relationship in both directions
(FROM or TO the joined table) with the $reverse_rel option. Rename
internal variables for readability.
Improve exception if relation uses an invalid ForeignKey.
Join the through relationship before the has_many.

Otherwise you need to specify it anyway, needlessly.
Improve error message on strict access to relationship that doesn't exist.