The Texas attorney general has filed a lawsuit against General Motors, accusing the company of “unlawfully collecting drivers’ private data and selling it to several companies.”