profile-activities: generate and filter private notifications
Notifications of private profiles or provite contents were not being generated. This patch generates these notifications and filter activities being displayed to the user according to her/his permissions.
Making this work through pure sql is just too complex. It was needed to filter results after pagination, for performance reasons, and perform some workarounds to not mess with the paginated results.