Stochastic Gravity: Theory and Applications