An introduction to the stochastic calculus of variations