Matrix-Analytic Methods in Stochastic Models