Stop declaring non-exported externs to non-core XS modules [perl #114516]

Hide the perl.h declarations of gete?[ug]id and getlogin on Win32 since
they are already declared in win32/win32.h, nearer to their definitions
(stub functions for UNIX compatibility) in win32/win32.c.

Also only declare them, and kill(pg)?, sbrk, chown and mkstemp, under
PERL_CORE anyway since they are not exported: including declarations for
non-exported functions just hides compiler errors about the symbols being
undefined, which doesn't help when trying to fix subsequent errors from
the linker about the symbols being unresolved. (Actually, all but sbrk,
chown and mkstemp get indirected through the perlhost layer normally
anyway, but it doesn't hurt to still hide the declarations, and helps in
the case of PERL_IMPLICIT_SYS not being defined, where only kill is
redefined to something which is exported.)

The declarations of the set[ug]id stub functions remain for now because
those two symbols are currently exported.
regmatch(): use nextchar where available

In a couple of places the code was using *locinput, where
nextchar already equalled *locinput
regmatch(): consolidate locinput++

There are several places in the code that increment locinput by 1 char
(which may or may not be 1 byte) then update nextchr.

Consolidate these into a single code block with the others goto'ing it.
This actually reduces the code more than it appears, since the CCC_TRY*
macros expand into several branches, each of which repeatthe
increment code.
regmatch(): nextchar should always be positive

Remove the one bit of code that tests for < 0, and put in a
general assert.
regmatch(): do nextchr=*locinput at top of loop

Currently each branch in the main regmatch() loop is responsible
re-initialising nextchar to UCHARAT(locinput) if locinput is modified.

By adding
    nextchr = UCHARAT(locinput);
to the head of the loop, we can remove most of the nextchar assignments
in the individual branches. We lose slightly for the zero-width assertions
like \b which will re-read the same nextchar, but this will make it
easier to handle non-null-terminated strings.
regmatch() annotate ops and separate out branches

Annotate each 'case OP:' in the main switch in regmatch() to show
what regex pattern this implements. About half the ops had already been
done. Also add a blank line between each 'case' statement for readability.
(no code changes)
regmatch(): fix typo in TRIE commentary text
stop regex engine reading beyond end of string

Historically the regex engine has assumed that any string passed to it
will have a trailing null char. This isn't normally an issue in perl code,
since perl strings *are* null terminated; but it could cause problems with
strings returned by XS code, or with someone calling the regex engine
directly from XS, with strend not pointing at a null char.

The engine currently relies on there being a null char in the following
ways.

First, when at the end of string, the main loop of regmatch() still reads
in the 'next' character (i.e. the character following the end of string)
even if it doesn't make any use of it. This precludes using memory mapped
files as strings for example, since the read off the end would SEGV.

Second, the matching algorithm often required the trailing character to be
\0 to work correctly: the test for 'EOF' was "if next char is null *and*
locinput >= PL_regeol, then stop". So a random non-null trailing char
could cause an overshoot.

Thirdly, some match ops require the trailing char to be null to operate
correctly; for example, \b applied at the end of the string only happens
to work because the trailing char (\0) happens to match \W.

Also, some utf8 ops will try to extract the code point at the end, which
can result in multiple bytes past the end of string being read, and
possible problems if they don't correspond to well-formed utf8.

The main fix is in S_regmatch, where the 'read next char' code has been
updated to set it to a special value, NEXTCHR_EOS instead, if we would be
reading past the end of the string.

Lots of other random bits in the regex engine needed to be fixed up too.

To track these down, I temporarily hacked regexec_flags() to make a copy
of the string but without trailing \0, then ran all the t/re/*.t tests
under valgrind to flush out all buffer overruns. So I think I've removed
most of the bad code, but by no means all of it. The code within the
various functions in regexec.c is far too complex to be able to visually
audit the code with any confidence.
[MERGE] make regex engine handle non-null-terminated strings
Make PL_compcv visible to BEGIN blocks

This allows BEGIN { XS_func(); } to access the currently-com-
piling pad.

BEGIN blocks were unlike any other subroutine or special block in that
PL_compcv would be set to the BEGIN block itself at run time.
Test XS registration of state subs

my subs do not currently work yet.  I am not sure what the API
should be.
mg_get should be called before access
perlvar.pod: Document UTF8CACHE
pod/perlrecharclass.pod: Small corrections, typos
regcomp.c: Properly handle no isblank(), isascii()

Configure probes whether or not these two C library functions are
present or not.  (However until commit
1c6eef9acffe4b512210edba79119e423ea4874a it didn't find isblank() even
if present.)

However the code changed by this commit always presumed both functions
were present.  That there were no failure reports from the field
indicates that Perl is being run on systems where they are present.
regcomp.c: Add a less confusing #define alias

ALNUM (meaning \w) is too close to ALNUMC ([[:alnum:]]) for comfort
regen podcheck after MPE port removed

Commit b5afd3466ff5e5b70ea2921169f138f02727183e removed the MPE/iX
port, which included a file that had known (to podcheck.t) pod errors
podcheck doesn't currently check if a pod has been removed, so its data
base still contained the offending entry, which would be removed the
next time it is regenerated for another unrelated reason.  This might
confuse spelunkers of perl history, so I'm regenerating it separately
now.
podcheck.t: Return success/failure from ok()

This program has a private version of ok() to avoid messages that would
come from the standard one that would confuse things in these tests.
It did not return true/false prior to this commit
porting/podcheck.t: Add test for removed files

If a file is removed from Perl that is in podcheck's data base,
it should be removed from the db at that time.  This adds a check
to make sure that happens.
perlreapi.pod: Reflow verbatim lines to 79 cols.