Anglo American has headed off a class action over allegations that a Zambian mine in which it held a stake for almost 50 years inflicted tens of thousands of people with lead poisoning.