Tesla stock rallies 20% after surprise quarterly profit