Tesla to sell $500 million of stock for spending spree on Model 3, Gigafactory