The US's largest carmaker says it will cut slow-selling models and shift more investment to electric vehicles.