[JENKINS-28446] - Introduce new API method in Queue to optimize the performance of UnlabeledLoadStatistics (cherry picked from commit 7697bdb4)