MDL-41191 mod_forum: avoid DISTINCT on TEXT columns

It is not supported by all db engines