Fix bug in BP_XProfile_ProfileData::get_data_for_user() that was causing previously cached values to be replaced with empty values

See #1332

git-svn-id: https://buddypress.svn.wordpress.org/trunk@7807 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
Refactor BP_XProfile_ProfileData::get_all_for_user() for performance

Method has been refactored to avoid joins, especially against global tables.
Direct SQL queries have been removed in favor of using existing query methods,
which has the added benefit of allowing existing caching strategies to be
inherited automatically from those methods.

Adds unit tests for the method.

See #1332

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