Walking with Terrain Reconstruction: Learning to Traverse Risky Sparse Footholds