Iterative path integral stochastic optimal control: Theory and applications to motor control