Tesla's Giga Shanghai produced the 2 millionth vehicle in about four years since production began in the plant.