Add object caching when fetching a single user's last activity.

Previously, BP_Core_User::get_last_activity() was not being cached.
This resulted in an unnecessary query being run on every page load due
to the usage of bp_core_record_activity() on the 'wp_head' action.

This commit caches calls to BP_Core_User::get_last_activity() when a
single user ID is passed and resets the cache when the user's last
activity is updated on BP_Core_User::update_last_activity().

See #5128

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