Fix global variable clashes in bp_group_has_invites()

The use of extract( $r, EXTR_SKIP ) in bp_group_has_invites() was preventing
the 'group_id' parameter passed to the function from being set in the global
and from being passed to the template class. This made the function impossible
to use outside the group context.

Fixes #5427

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