Humanoid Whole-Body Locomotion on Narrow Terrain via Dynamic Balance and Reinforcement Learning