[JobQueue] Optimized JobQueueGroup::pop().

* This also simplifies MediaWiki::doJobs().

Change-Id: I58ee2313453c64d4e8d91f3a65181aaa9c2e847f
Merge "[JobQueue] Optimized JobQueueGroup::pop()."