Stream tweaks

* Make sure `FlushAsync` executes the flush operation on the default task scheduler
* Throw the expected `ArgumentNullException` instead of `NullReferenceException` if the stream is null in `WriteAsync`
* Check the `CancellationToken` in `WriteAsync`