A Stochastic Quasigradient Algorithm with Variable Metric