The Ribaucour transformation in Lie sphere geometry