Allowing use of query in distinct

As the documentation of mongodb shows [1], we can specify a query
when using distinct. So we can perform operations like:

>>> db.person.distinct("age", {"status": "single"})

[1] - http://docs.mongodb.org/manual/reference/method/db.collection.distinct/#db.collection.distinct