A SMART Stochastic Algorithm for Nonconvex Optimization with Applications to Robust Machine Learning