Uber’s exits from Nigeria and Uganda highlight the growing challenges of making ride-hailing work in Africa.