A Canonization Perspective on Invariant and Equivariant Learning