Stochastic Online Optimization for Cyber-Physical and Robotic Systems