Once high-flying groups such as Klarna, SoFi and Upstart are selling billions of dollars’ worth of loans