APIfy newDEFSVOP
cleanup perlio.c and doio.c

IoIFP will be assigned to again in say_false block. This redundant code is
from commit 6e21c824d9 perl 4.0 patch 6.

in PerlIO_allocate replace a duplicate block with a goto

in PerlIO_resolve_layers replace a func call with a macro, this couldn't
have been using magic due to the previous SvROK
rmv redundant PerlIO_find_layer from PerlIO_default_layers

Obsolete as of commit fcf2db383b , prior to that commit, PerlIO_find_layer
was needed to convert a PerlIO_funcs * (var osLayer) to a SV * since
PL_def_layerlist wasn't a PerlIO_list_t * but a AV *. After that commit
PerlIO_find_layer returns a PerlIO_funcs *, and we start with a
PerlIO_funcs * (var osLayer), so PerlIO_find_layer is redundant.

Also _NN a stack arg for smaller code.
add /dev/null support to :win32 io layer

:unix layer on Win32 OS supports this, so :win32 also has to. Without this
base/term.t dies with

ok 5
Can't open /dev/null. at base/term.t line 41.

C:\perl521\src\t>

After this, all tests in base/term.t pass when :win32 is the default OS
layer.
do not lock files when doing open() on :win32 layer

MS CRT uses _SH_DENYNO flag internally for all open() calls. Not passing
FILE_SHARE_READ and FILE_SHARE_WRITE to CreateFile means we want exclusive
access to the file, otherwise CreateFile fails. Always locking the files
causes :win32 is base layer perl to not be able to have 2
handles/FDs/PIOs open simultaneously to the same disk file. This causes a
behavior different from :unix is base layer win32 perl, and also causes a
number of test fails to fail. See #122224 for details of test fails.
Getting read/write lock on open behavior comes from initial
commit a8c08ecdc5 of win32 layer.