Kellogg, J.M. Smucker and other food companies are making big bets on snacking, but the rise of Wegovy and Ozempic could pose a threat to future sales growth.