South African President Cyril Ramaphosa addressed the discord head on in his opening speech, saying the world was under threat from rising intolerance and wars.