Get pre-assigned agent counts in main job query

This saves us one query per job, which in this particular case is a big
deal. With sqlite and 1050 jobs, the reduces the scheduler's runtime
from > 2 minutes to < 10 seconds on my machine.
Merge pull request #273 from guidow/optimize_scheduler_again

Get pre-assigned agent counts in main job query