Fixes date_modified on a group test

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7321 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Fixes groups meta_query for multiple clauses

The 1.8 implementation of meta_query for BP_Groups_Group::get() did not
properly handle multiple clauses, because of certain necessary
transformations of the SQL syntax to match the peculiar syntax in the
groups component. This changeset fixes the problem by improving the
logic used to parse the SQL returned from the WP_Meta_Query object.

A related included fix is that a DISTINCT keyword has been added to the
main SELECT clause of the groups total sql statement. This ensures that
multi-clause meta_query queries will not return duplicate values.

Also adds an automated test for the situation described above.

Fixes #5119

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7322 cdf35c40-ae34-48e0-9cc9-0c9da1808c22