In a few words, math and time don't favor you.

Grant the 17.5 tons of CO2 for Tesla Model S battery production. Now halve it for the all renewable Gigafactory.

Even at 17.5 tons, a Model S is significantly better off with batteries than an imaginary infinite power cord. The worst coal plants emit about 2 pounds per kWH, so a corded Model S powered from one would emit 80 tons of CO2 over a 20 year lifetime at 12,000 miles per year. Or no more than the initial 17.5 tons if charged by renewables. Or about 65 tons if powered by a 50+MPGe equivalent grid. And the comparable BMW 7 series would emit 96 tons burning gas.