jobqueue: improved performance of JobQueueGroup::getQueuesWithJobs()

* Also added a JobQueueGroup::getQueueSizes() function.
  This function is now used by the SiteStats to make is
  meaningful for when queues are not in the DB. This number
  is already exposed via the API.

bug: 45072
bug: 50635
bug: 9518
Change-Id: I75c16ffa14c963e7f8fb7cb390e6cc4cde0a5804