Wal-Mart has joined a new program that rates companies on their use of chemicals, a move that puts fresh pressure on the consumer-products industry to police its ingredients. The world’s largest retailer is participating in the Chemical Footprint Project, which seeks to help companies root out dangerous substances from the products they sell.