Added implicit unlock to next_job while loop in
inster_into_alljobs_by_rank.