Fix readable byte stream example
This change fixes a few bugs in the example for readable byte streams.
One of the bugs in the existing example is that there is infinite
recursion for streams that have a total length of less than 1024.
Furthermore, another bug is that the return value of
reader.read() is not
In the new version, iteration is used instead of recursion, together with