The Impact of Anisotropic Covariance Structure on the Training Dynamics and Generalization Error of Linear Networks