Refactor Messages component's approach to Notifications integration:

* Introduce helper functions for handling the adding/marking/deleting of notifications. Hook these new functions into their respective actions rather than have them hardcoded and interspersed amongst the first-class code.
* See #5266.

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