Overhaul caching for user last_activity values

The last_activity methods in the BP_Core_User class were originally designed
without persistent caching in mind. In r8047, some minimal caching support was
introduced, but it was tacked on and incomplete. In particular, it depended
on an inconsistent structure of return values from the last_activity methods.
See #5128 for more background.

This changeset introduces a number of changes that make last_activity methods
perform more consistently, as well as full support for object caching.

- BP_Core_User::get_last_activity() always returns a multidimensional array
  of last_activity arrays, keyed by user_id. This remains true even when
  last_activity data is being fetched only for a single user.
- last_activity data is stored in the bp_last_activity cache bucket without
  the user-id-keyed wrapper.
- BP_Core_User::get_last_activity() now uses the same caching technique as
  other BuddyPress and WordPress queries: detect which requested items are not
  yet in the cache, prime the cache for those items, and then fetch all
  requested values directly from the cache to build a return value.

Fixes #5590

Props imath, johnjamesjacoby for initial patches

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