Fixing performance issues in some forum queries.

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.