Kraft Heinz beats quarterly estimates, takes nearly $3 billion writedown