stream2: flush extant data on read of ended stream

A ReadableStream with a base64 StringDecoder backed by only
one or two bytes would fail to output its partial data before
ending. This fix adds a check to see if the `read` was triggered
by an internal `flow`, and if so, empties any remaining data.
    
Fixes #7914.
Could you please add a comment here explaining the behavior? I know that you already said it here, but finding the issue is more complex than just reading a text in code :)