Precision QCD corrections to gluon-initiated diphoton-plus-jet production at the LHC