Symmetry-Aware Generative Modeling through Learned Canonicalization