Resolution of singularities in representation theory