It’s more than a century since the world’s most famous literary detective made his appearance, but our appetite for his startling deductions is undiminished. Adam Frost and Jim Kynvin go back to the stories in search of data to explain his enduring appeal