Thermodynamic optimization of the Ga–Se system