Sampling Controlled Stochastic Recursions: Applications To Simulation Optimization And Stochastic Root Finding