Rewriting join code -- allow joins on models not related by foreign key
so long as an expression is provided. Also rewrote the join generation
code to do the DFS with a while-loop rather than recursion