Capturability-Based Analysis and Control of Legged Locomotion