Teva to buy Allergan's drug-distribution business for $500 million