Groups: When preparing the Group Members template loop, use the details of the group passed to the class rather than always using `$bp->groups->current_group`.

The global property is usually set to the currently-displayed group according to BP's URI parsing, but if the Group Members template loop is used outside a typical Groups context (such as in 3rd party plugin, or a unit test), then this variable isn't set. At worse, it'd use the wrong group's details to build the template loop.

Fixes #5420

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7978 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Merge branch 'master' into xprofile-types