Nancy Pelosi's legacy as she prepares to step aside as House speaker