Statistical Inference with Stochastic Gradient Algorithms