The president addressed a gathering in Cape Town on the 30th anniversary of Nelson Mandela’s release from prison.