Spice maker McCormick & Co. has posted a leap in third-quarter profits on the back of rising sales from its consumer and B2B businesses.