The Wanda Group, a Chinese company with diversified investments in the entertainment industry, has agreed to buy AMC Entertainment, the nation’s second-largest theater chain. The deal marks the largest investment to date by a Chinese company in the American film industry.