Tesla's third-quarter profits and gross margin shrank from a year earlier as the electric automaker slashed prices to boost demand in the face of higher interest rates.