To fund a 70-nation infrastructure initiative, Beijing has been extending loans in opaque deals often contingent on using Chinese contractors. Three years into China’s program in Pakistan, that nation is heading for a debt crisis, caused in part by a surge in Chinese loans and imports.