As the coronavirus spread around the globe, Pakistan’s foreign minister called his counterpart in Beijing last month with an urgent request: The country’s economy was nose-diving, and the government needed to restructure billions of dollars in Chinese loans.