US ketchup giant Heinz has posted a 5.7% drop in third-quarter earnings, despite an strong sales performance, following the sale of two businesses.