Prevent negative job array index

We've seen slurmctld crashes due to negative job array indices.
Merge branch 'slurm-14.03' into slurm-14.11
Merge branch 'slurm-14.11'