Copy CoreFX FileStream to CoreLib
This copies FileStream to CoreLib and uses it in place of the legacy
FileStream. Code is mostly a direct copy with the addition of a few
internal constructor overloads.
Adds a simple Debug wrapper for BCLDebug to allow keeping the code
the same. Also follows the same pattern for SR wrapping.
Needed to bring down PreAllocatedOverlapped.
- Expose FileStream in model.xml
- Remove native usage of FileStreamAsyncResult
- #ifdef SafeFileHandle creation in existing code (to avoid mismatched
PAL/CoreFX usage)
Commit migrated from https://github.com/dotnet/coreclr/commit/
5a7fb90eb479450cd5671e4531336dea7c072492