Speaker Nancy Pelosi’s announcement paves the way for a new generation of Democratic lawmakers to fill the leadership ranks.