notification: Extract some codes adding notification.

To addNotificationFromNewPost and addNotificationFromNewComment.
issue: Replace IssueApp.isAssigneeChanged.

With Issue.assigneeEquals.
notification: s/send/add/ to sendStateChangedNotification.
notification: Extract some code getting receivers.
notification: Use getEmailFromSmtp().
notification: Add comments.
notification: Add some exception handlings.

In getProject() and resourceExists(), throw an exception if the current
resource type is unknown or unsupported.
notification: Remove an empty line.
Notification: Remove an unused import.
Notification: add fields for serialization.
notification: Use NotificationEvent.add instead of save