Stability Analysis And Optimal Control Of Large-Scale Stochastic Systems