Gittrac #3834:  We now make sure a job is queued before changing
its idle status and the overall idle count.  Also, we do a sanity
check to make sure that the idle count is zero when there are no
jobs in the queue.