Fix GRES anomaly picking CPUs

Previous logic would only make available the CPUs associated with
the first N GRES, where N is the number of requested GRES. CPUs
which might be made available by using different GRES were not
considered available.
bug 1092