Mechanically Intelligent Elongate Limbless Robots for Locomotion in Complex Land and Water Environments