Introduce `bp_notifications_get_all_notifications_for_user()` and move duplicated caching code into it.

This enables manipulating of notifications in other ways outside of the grouping performed for the adminbar.

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