Tesla is discontinuing its premium cars, the Model S, and Model X, as the company steers towards autonomous driving.