Apply default scope conditions for association joins

Avoid selecting records from joins that would normally be filtered out
if they were selected from the base table. Only applies to Rails 3, as
this issue was fixed since Rails 4.
Merge pull request #426 from avit/association-default-scope

Apply default scope conditions for association joins