A U.S. judge ruled that General Motors is entitled to a shield from many lawsuits over a defective ignition switch ruling.