DETROIT — In a notable victory for General Motors, a lawsuit that helped spur the biggest safety crisis in the company’s history has been withdrawn in exchange for a settlement from its compensation program, according to two people briefed on the agreement. The lawsuit was the second brought by the family of a Georgia woman, Brooke Melton, who died in 2010 in a car with a faulty ignition switch that has now been linked to at least 64 deaths. For G.M., the agreement removes the significant legal threat of senior officials, including Mary T. Barra, the automaker’s chief executive, being...