GM cuts jobs, ends models amid shift to electric and autonomous cars