Stocks end lower as tech swoon persists, Tesla in historic drop