Enhancing Efficiency of Quadrupedal Locomotion over Challenging Terrains with Extensible Feet