The science of what makes good chocolate has been revealed by researchers studying a 140-year-old mixing technique.