Mary Barra is credited with stabilizing G.M. after the company admitted to selling millions of cars with defective ignition switches that were later tied to at least 124 deaths.