Close-form solutions for the gain and refractive index of multiple-state quantum-dot semiconductor optical amplifiers