[tools] testbot/Engine: Optimize sorting the jobs for scheduling.