cgminer: use loop to parse gpu data

was using fixed index at the beginning, and now use loop to parse the gpu data

Signed-off-by: AceLan Kao <acelan@acelan.idv.tw>