In Perl_do_openn(), move {in,out}_{raw,crlf} into the !as_raw block.

These 4 variables are only needed there, so by moving them into the block we
save doing unneeded work for the as_raw case (ie sysopen), and as a side
effect make the function a bit clearer.
Perl_do_openn() should call PerlIO_openn() with arg NULL if narg is 0.

If narg is NULL, then PerlIO_openn() doesn't look at args.

(Technically except for PerlIOStdio_open() if f is non-NULL, which doesn't
check narg and assumes that args[0] is valid. That lack of check is probably
a bug. But it doesn't matter in this case, as f is NULL)

This makes it clear that arg isn't needed at this point in Perl_do_openn().

This is a more complete version of the change made by commit dd37d22f759197ae
(March 2002), which just changed the call to pass 0 for narg.
Perl_do_openn() doesn't need to set num_svs and svp.

These variables are no longer used later in the function, so no need to set
them. This permits the declaration of the variable namesv to be moved from
the top of the function into the blocks that use it.
In Perl_do_openn(), move the variable result into the block that uses it.

This also removes a couple of places which would set result = 0 to simulate
"success" for an a later if block. Those paths now don't even reach that
if block.
In Perl_do_openn(), disambiguate the two separate uses of the variable fd.

Rename the first uses of the variable fd to wanted_fd to show that the
variable is not used to pass a value to later in the function.