Gradient Descent with Linearly Correlated Noise: Theory and Applications to Differential Privacy