Ted Wells Jr., who defended Exxon against a lawsuit by New York’s attorney general, has given half a million dollars to Democrats in recent decades.