Migrate user 'last_activity' data from usermeta to the activity table

Storing last_activity in usermeta caused severe bottlenecks on sites with
large user bases. The usermeta table has a tendency to get bloated. Its
option_value column is not indexed, and even if it were, it would not be
indexed properly for the kind of chronological sorting that BuddyPress was
using it for.

This changeset refactors all core last_activity user functionality, so that
the data is stored in the wp_bp_activity table (even when the activity
component is disabled).

For backward compatibility with plugins that reference last_activity metadata
entries, all last_activity data is retained in wp_usermeta, and new data will
be mirrored there until further notice.

See #5128

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7861 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Migrate xprofilemeta functions to the WP metadata API

The case of XProfile metadata is complex, because xprofile groups, fields, and
data all store their metadata in a single table, differentiated by object_type.
This complication requires additional filters on WP's core metadata queries.

See #4551

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7862 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Don't run get_user_meta( 'last_activity' ) warning during last_activity mirroring

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7864 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Pass $group object to bp_get_group_description_excerpt filter

This allows theme/plugin authors to more easily customize excerpts.

Fixes #5393

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

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7866 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Improve string escaping in wp-admin/Profile

Props DJPaul

Fixes #5396

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