China’s leader is using the country’s success — and the criticism against it — to urge the party and the people to weather tough days ahead.