Simplify readableStream.cancel() algorithm by using transform idiom