Simplify logic that transforms WP_Meta_Query SQL for Groups queries

This simplified logic fixes a bug related to the use of the 'compare'
operator in certain cases.

Fixes #5824

Props imath

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

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