Homogenization of SGD in high-dimensions: Exact dynamics and generalization properties