Fixing performance issues in some forum queries due to distinct.

DataQuery always adds DISTINCT to queries, but this slows things down
when performing queries against large amounts of data. In those cases,
we also don't need to be checking distinct.
Merge pull request #100 from halkyon/performance_fixes

Fixing performance issues in some forum queries.