Remove all the never used parameters from the macro validate_suid()

Several parameters are unused in either remaining variant of the
validate_suid() macro. The two variants which used the extra parameters
were removed with suidperl by commit cc69b689ee7c2745 in Jan 2009.
In S_parse_body(), don't "leak" linestr_sv until global destruction.

This commit ensures that linestr_sv is properly cleaned up, if allocated.

The local variable linestr_sv was added by commit 009d90df4e17a415 in 2007,
to replace use of PL_linestr in S_parse_body(). However, that commit didn't
add any code to free linestr_sv at the end of S_parse_body(), meaning that
the SV sticks around until global destruction.

Subsequent code simplification possible by the removal of suidperl reveals
that linestr_sv is only needed for the '-x' option, so it's safe to avoid
allocating it up front. Additionally, during '-x' processing, Perl_sv_gets()
will upgrade the target SV to SVt_PV and allocate the string buffer as needed,
so there's no need to pre-upgrade or pre-allocate the SV in S_parse_body().
This slightly reduces the amount of code.
Add 2 assertions to S_open_script().

If *suidscript is TRUE, then fdscript has to be >= 0;
If we're defaulting to reading from stdin, then *suidscript has to be FALSE.

Knowing that these both hold will permit simplification of the code.
In S_open_script(), avoid setting scriptname to "" to benefit one if() test.

If PL_origfilename is "-" then scriptname was being set to "". However, the
only thing then depending on the value of scriptname was an if() test 4
lines later. Hence simply augment that if test with the check for "-",
avoiding the need for an assignment.
Add t/run/fdopen.t, which tests the /dev/fd/\d+ code for opening scripts.

perl uses S_open_script() in perl.c to open the file handle on the Perl
program. In 5.003 this was enhanced to parse filenames such as /dev/fd/3
(directly using fdopen() to open file descriptor 3), as part of a suidperl
fix. It was subsequently further enhanced to permit $0 to be set by
suffixing the /dev/fd/\d+ with the file name to use.

Although suidperl was removed from the core by commit cc69b689ee7c2745 in
Jan 2009, this code remained, as it's a useful feature for anyone wishing
to maintain suidperl externally, or write an alternative secure wrapper
system.
Normalise two error messages in S_open_script() to have trailing periods.

All the other fatal errors generated by switch parsing and script opening
don't pass a trailing "\n" to Perl_croak(), resulting in output with a
trailing period. (And no filename or line number, as these are not set yet.)
Pass doextract to S_open_script(), signaling whether -x is enabled.

Inline the suidscript is true part of the forbid_setid() test for 'x' in the
fdopen branch of S_open_script(). This means that for all callers of
forbid_setid(), the parameter suidscript is false.
Eliminate the suidscript parameter from S_forbid_setid() - it's always false.
Inline the "program input from stdin" check into S_open_script().

This removes the special case code for this from S_forbid_setid(), leaving
it dealing only with checking on -x options. For both locations, refactor the
croak() logic to share the same message format string.
In perl.c, only compile S_forbid_setid() if it's needed.

If SETUID_SCRIPTS_ARE_SECURE_NOW is defined, S_forbid_setid() is a no-op,
so don't compile it. Move the declaration and definition of S_forbid_setid()
into the same pre-processor blocks as are used for S_validate_suid(), which
is a no-op when SETUID_SCRIPTS_ARE_SECURE_NOW is /not/ defined.