Implement persistent caching in BP_XProfile_ProfileData::get_value_byid()

This change should mean significant performance improvements, as the method
is used a number of places throughout BuddyPress:

- bp_get_the_profile_field_options() (to check/select the saved values)
- xprofile_get_field_data()
- when swapping out blog commenter names with BP display names

Introduces unit tests for the method.

See #1332

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