Food giant Mars has announced it is buying snacks and cereal company Kellanova in a deal worth $36bn (£28bn).