Call ActiveRecord#distinct instead of custom query

Prevent this error when calling AR#any? (or AR#count) on a collection in
spree/admin/products_controller

   PG::UndefinedColumn: ERROR:  column "count_column" does not exist
   LINE 1: SELECT COUNT(count_column) FROM (SELECT  DISTINCT ON(id,name...
                        ^
   : SELECT COUNT(count_column) FROM (SELECT  DISTINCT ON(id,name) spree_products.* AS count_column FROM "spree_products"  WHERE "spree_products"."deleted_at" IS NULL AND ('t'='t') LIMIT 10 OFFSET 0) subquery_for_count

Not sure what exactly changed inside rails that made the query invalid. This is
the query generate now:

    SELECT COUNT(DISTINCT count_column) FROM (SELECT  DISTINCT "spree_products"."id" AS count_column FROM "spree_products"  WHERE "spree_products"."deleted_at" IS NULL AND ('t'='t') LIMIT 10 OFFSET 0) subquery_for_count

And this is the query generated in current Rails 4-0-stable:

    SELECT COUNT(count_column) FROM (SELECT 1 AS count_column FROM "spree_products" WHERE "spree_products"."deleted_at" IS NULL AND ('t'='t') LIMIT 10 OFFSET 0) subquery_for_count