It is costing Pfizer nearly half a billion dollars to settle a decade-old shareholder lawsuit tied to two controversial pain drugs, Bextra, which it no longer makes, and Celebrex, sales of which have been dropping as generics eat away its market share.