Tuning Stochastic Gradient Algorithms for Statistical Inference via Large-Sample Asymptotics