[Message Tray] Check for pending notifications before acting. Plus some cleanup.
[notification applet] Handle destroyed notifications gracefully.

This should fix the bug which stops the applet responding to mouse
clicks.