Compatibility for ActiveRecord 4.x

Fixed issue with empty arguments being passed into joins() and a change
in ActiveRecord::Reflection::AssociationReflection in 4.x.

ActiveRecord requirements upgraded to >= 3.2 in gemspec.

Maintained compatability with ActiveRecord 3.2.x