Insect Locomotion: Control, Stability, and Optimization