Fixed double API call on close notification

When a notification got closed by clicking the close button when it
already was expired, expireNotification() was called again and a useless
API-call was done.

Now expireNotification() will only be called if it wasn't called yet.
Added a variable "expired" to set the right status.