Minimize buffer allocations in Stream.CopyTo for seekable streams (dotnet/coreclr#4540)
The current implementation of Stream.CopyTo allocates a giant, 81920-byte buffer if no bufferSize parameter is passed. This is incredibly wasteful if the stream we're copying from can seek, because then we can use the Length and Position properties to determine how many bytes are left and allocate a buffer of that size.
Commit migrated from https://github.com/dotnet/coreclr/commit/
91eb03162ceef78beb33548cacd98105376a2a4c