Update g_fopen, g_open and g_creat to open with FILE_SHARE_DELETE sharing access

Very loosely based on the patches in
GNOME/glib#539

but with much more robust file mode parsing and error handling.
Implements most of the definition as provided on msdn for fopen.

If charcter conversion is requested (via _O_U8TEXT, _O_U16TEXT, _O_WTEXT or any
of the 'ccs=utf8/utf-16le/unicode'), g_fopen and g_open fall back to use
_wfopen and _wopen respectively, as there is no easy way to replicate the
expected behaviour of those modes, particularly around BOM handling.
10 jobs for win32-gstdio-open in 35 minutes and 56 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #333379
cross-android_api21_arm64

00:02:43

passed #333380
cross-android_api28_arm64

00:01:25

passed #333381
cross-mingw64

00:03:20

passed #333377
debian-stable-x86_64

00:03:35

passed #333376
fedora-x86_64

00:07:00

passed #333378
G_DISABLE_ASSERT

00:03:37

passed #333382
win32
msys2-mingw32

00:07:59

passed #333383
win32
vs2017-x64

00:09:07

 
  Coverage
passed #333384
coverage

00:01:15

78.1%
 
  Analysis
passed #333385
scan-build

00:12:17