Double-soft limits of gluons and gravitons