Pfizer is nearing a deal to buy Allergan, a rival drug maker that has its headquarters in Ireland, for as much as $150 billion, potentially helping the company move its corporate citizenship abroad and reduce its tax bill.