Add object caching when fetching the active notice.

This commit:

- Introduces a new hook - 'messages_notice_before_delete' to do something before a notice is deleted
- Adds object caching to the BP_Messages_Notice::get_active() method
- Adds a cache invalidation function to bp-messages-cache.php
- Adds a unit test

Fixes #5419

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7994 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Add phpDoc for BP_Messages_Thread class.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7995 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7995

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7996 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Properly set object cache for a new BP_Activity_Activity object.

This commit also renames the activity cache key and group to be
consistent with the groups component. (See r7956.)

See #5434.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7997 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Reinstate updated_profile activity item

Once upon a time, a user's activity stream was updated when that user updated
his/her profile. This changeset reintroduces (and rethinks) that functionality.

- New phrasing is "Boone's profile was updated", to avoid gendered pronouns in
  English
- updated_profile items are limited to one per user per two-hour period
- Activity items are posted only when at least one publicly-visible xprofile
  field has been changed

Fixes #4636

Props ericlewis, boonebgorges

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7998 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't query friendship status in BP_User_Query for logged-out users.

The bp_friends_filter_user_query_populate_extras() function is used to
add the confirmed friendship status against the logged-in user to the
existing user query.

However, we don't need to run this query if a user isn't logged in.

See #5435.

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7999 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r7999

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8000 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Properly set object cache for a new BP_Groups_Group object.

See #5407

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8001 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8001

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8002 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Bracket normalization in BP_Activity_Activity::append_comments()

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8003 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Clear activity item cache when it receives comments

r7997 fixed a bug was causing single activity items not to be cached properly
when a BP_Activity_Activity object was instantiated. This fix uncovered a bug
in activity commenting, where the activity parent was cached as childless, and
the cache was not invalidated when a new comment was posted.

See #5434

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8004 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Normalize the cache keys and group name used for activity comments

wp_cache_get( $aid, 'bp_activity_comments' )

is more in line with single item caching across other components.

See r7956, r7997

See #5434

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8005 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
POT, generated from r8005

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