Make std.stdio.File.error and flush @trusted
Remove unnecessary enforce
Add test-cases for Issue 12349
Merge pull request #1997 from tom-tan/trusted-std-stdio-File-error-flush

std.File.flush and error causes segfault after calling close