A trip to Beijing early in Nancy Pelosi’s career illustrates the spirit that has become her trademark