Notifications fixes

Notification applet: Keep destroyed notifications out of the list.
Message Tray: Check whether the notification queue is empty before shifting off the next item. Reduce the amount of duplicated code.

Together, these changes should make the notification applet much less likely to freeze.