South Africa signed long-delayed renewable energy contracts worth $4.7 billion with independent power producers on Wednesday, in the first major investment deal under President Cyril Ramaphosa.