Filter out current task when counting active tasks

We are sometimes experiencing problems with jobs not getting set to
failed or done after their last task stops running.  This is an attempt
to address that problem.
Merge pull request #283 from guidow/job_end_changes

Filter out current task when counting active tasks