Cache the group invite count for a user.

This commit:
- Caches calls to BP_Groups_Member::get_invite_count_for_user()
- Invalidates the group invite count cache on various actions
- Adds a unit test

See #5414

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