[tokenizer] call WritableStream#end after emitting the remaining data