Made GetJobQueueLengths handle different types of queue classes.

Change-Id: I131cd1d45cff7e8bcaead3170d30804d548dc54e
Merge "Made GetJobQueueLengths handle different types of queue classes."