GS is buying General Motors’ credit card business, according to people familiar with the matter, marking the bank’s second big-name credit-card partnership and another step towards balancing its operations with heft in consumer finance.