GRES: Improve task layout with respect to node topology

If a user requests multiple counts of a specific GRES type (e.g.
"--gres=gpu:2") and those GRES are associated with specific CPUs,
the job submit could fail without this change.
Note the restricted use of the --gid option by the salloc command

Response to bug 274
Merge branch 'slurm-2.5'