Implement check for dataset expiration in notification mail

If the dataset has expired, the query notification mail will tell that to the user and cancel the subscription.