Use duck type instead of class check

Rails 4 returns a CollectionProxy object when you call the association
method, so we need to check if the object we have respond to some
methods instead of checking if it is an Array

Fixed #61
Merge pull request #66 from plataformatec/rm-fix-association-rails-4

Use duck type instead of class check
Refactor associations checks based on responding to #to_ary

Both Arrays and AR Collections should respond to #to_ary, so we should
be safe relying on them.