Coty Inc. agreed to buy the London-based hairstyling-appliances company GHD for £420 million ($511 million) in cash, expanding its offerings in the professional hair category.