When a task is marked completed, its browser notifications are still
shown upon navigating Horde.

To reproduce:

1. Create a new task with due date this morning, 15 min alarm, and
browser notification.

2. The browser notification will appear after saving the task.

3. Navigate to the task overview and mark the task as completed.

4. Navigate to any other Horde page, and the browser notification
still appears even though the task is completed.

5. Now, log into horde using a different browser and the browser
notification will appear as well (NB this other browser has never
'seen' the task in the uncompleted state, hence the notification must
have been triggered on a completed task by horde).

Expected behavior:

Browser desktop notifications should only be triggered on pending
tasks, not on completed tasks.

Tested on:

Firefox 47.0 and Chromium 50.0.2661.102 on Ubuntu 16.04 64-bit as well
as Firefox 47.0.1 on Windows 7 64-bit.