South African president survives party revolt