Stochastic optimization using a trust-region method and random models