Discontinuous locomotion and prey sensing in the leech