job_coordinator: Do not put the failed tasks in the pending list.

The pending list is going to be retried every-time the job coordinator has a
chance. The failed tasks however will be retried independently after the
timeout. Therefore, we end up running some tasks more than once.
job_coordinator: try to launch new tasks as soon as one finishes.
jobpack: use a record for job scheduling options.
job_pack: re-introduce the max_core option.

Now the clients can specify the maximum number of cores a job can use.
jobpack: add scheduler to the jobpack of pipeline jobs.
Merge pull request #538 from pooya/max_cores

Max cores