Generalised pushouts, connected colimits and codiscrete groupoids