Changes BP_Groups_Group::get_meta_query_sql() to be access: protected

This method constructs only a part of a larger SQL query. It is therefore
very implementation-specific, and we want to retain the possibility of
modifying how it works in the future.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7084 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Allow group factory creator to accept a custom last_activity param

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7085 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Adds some @group declarations for Groups testcases

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7086 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Introduces 'order' and 'orderby' parameters for the bp_has_groups() stack

'order' and 'orderby' are more specific and flexible versions of the existing
'type' parameter ('popular', 'newest', etc). Backward compatibility is
maintained by always obeying 'type' when it is passed, and by internally
converting the legacy 'type' values into the corresponding 'order' and
'orderby' values.

Adds unit tests to ensure that the adjusted default values for functions in
the stack are backward compatibile (in particular, the fact that the 'type'
parameter is now empty by default, replaced with the corresponding default
values for 'order' and 'orderby'). Unit tests are also added for the new
params, as well as some internal utility methods.

See #4483

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