modify activerel queries: threadsafe, simpler

This fixes a thread safety issue, adds an `all` class method, and modifies `where`. Sadly, this is still not too great... Using a string with `where` requires you to know that the relationship will be marked as `r1`. I don't think there's much of a solution to this beyond writing an ActiveRel QueryProxy class, which I'm not sure would be worth doing.