S&P became the first foreign credit-rating company to offer an independent assessment of risk in China’s vast domestic debt market, giving a top grade to a unit of the country’s largest bank.