Obama heads to South Africa as ailing Nelson Mandela clings to life