China’s president is in South Africa to reassure leaders of his commitment to the continent.