Tesla extends profit run for fourth straight quarter, shares rise