Teva to buy Allergan's generic drug business for $40.5 billion; drops Mylan bid