Converts javascript to AMD
Treat comments and discussion_replies as entities instead of annotations.
Improve compatibility with Elgg 1.9 notification plugins.

Passing in the notification object and event e.g. allow the site_notifications plugin to generate a link to the entity where the mentioning took place.
Merge pull request #23 from juho-jaakkola/notify_user_params

Improve compatibility with Elgg 1.9 notification plugins.