Tesla Inc set a record for quarterly vehicle deliveries in a triumphant response to months of questions about demand for its luxury electric cars, sending shares up 7% after hours on Tuesday.