Africa’s biggest bulk-water supplier has had to write off millions owed by cities that have failed to pay their bills.