Update RecyclableMemoryStream.cs (#95)
Update RecyclableMemoryStream.cs (#95)

* Update RecyclableMemoryStream.cs

WriteByte is found to be very slow. It goes through the more general code path of writing a byte array. CheckDisposed is called twice, EnsureCapacity is always called, and finally BlockCopy is called to copy a single byte. Write a separate WriteByte implementation.

* remove byteBuffer, inline GetBlockAndRelativeOffset

Co-authored-by: Feng Yuan <3cb9ca420b11f4ffe68086aba4d68250af7caa57@ntdev.microsoft.com>
maxwellb/Microsoft.IO.RecyclableMemoryStream,Microsoft/Microsoft.IO.RecyclableMemoryStream