The grocery wholesaler, who has long held a pro-worker image, has been locked in a protracted battle with the Teamsters union, which represents 18,000 of Costco’s 219,000 U.S. worker base.