Stochastic Optimal Control as Approximate Input Inference