Refactor distinct method
Support `columns_for_distinct`
Use columns_for_distinct only when this method exists
Merge pull request #340 from yahonda/rails4_support_columns_for_distinct

Rails4 support columns_for_distinct