Fix hang in StreamExtensions.WriteAsync

- Don't use Task.Factory.FromAsync in StreamExtensions
- Use WriteAsync and ReadAsync directly in StreamExtensions on .NET 4.5

#1874
Merge branch 'release' into dev