Pass a JoinDependency to object.joins

Help to give a more accurate query. The nodes for the condition itself
however are not being built properly.

Example of a desired query:

        "comments\".\"body\" LIKE '%e%' OR \"comments_articles\".\"body\" LIKE '%e%'

What we currently get:

        "comments\".\"body\" LIKE '%e%' OR \"comments\".\"body\" LIKE '%e%'

Query related to current failing spec:

        => "SELECT \"people\".* FROM \"people\" LEFT OUTER JOIN \"comments\" ON \"comments\".\"person_id\" = \"people\".\"id\" LEFT OUTER JOIN \"articles\" ON \"articles\".\"person_id\" = \"people\".\"id\" LEFT OUTER JOIN \"comments\" \"comments_articles\" ON \"comments_articles\".\"article_id\" = \"articles\".\"id\" WHERE ((\"comments\".\"body\" LIKE '%e%' OR \"comments_articles\".\"body\" LIKE '%e%'))  ORDER BY id DESC"

Also had to do some tweaking in rails JoinDependency#join_constraints to
build the nested query joins properly