Stochastic network methods in large-portfolio credit risk