Foundations of Stochastic Analysis