select/cons_res - Add test for zero node allocation

I don't see how this could happen, but it might explain something
reported by Harvard University. In any case, this could prevent
an infinite loop if the task distribution funciton is passed a
job allocation with zero nodes.
Merge branch 'slurm-2.5' into slurm-2.6