REFACTOR handles joins

`#any_of` was not taking joins into account. This causes such queries to
raise exceptions :

```ruby
with_foo = Thing.where( foobars: { name: 'foo' }).joins( :foobars )
with_bar = Thing.where( foobars: { name: 'bar' }).joins( :foobars )
Thing.any_of( with_foo, with_bar )
```

`#joins` is now handled properly, as well as `#includes` and the new
rails-4's `#references`.

Close #1 .