libtaskmanager: recompute active task when a task is removed
This fixes a bug in the appmenu where when you close the last open window on a display, the appmenu doesn't get a signal that there's no longer an active task, and continues to display a now-dead menubar instead of clearing it.