Don't use Task.Factory.FromAsync in StreamExtensions

- We have seen WriteAsync hang

#1874