Added a test for QuerySet.distinct() (#160).
Implemented QuerySet.distinct(). Closes #160.