Fix debugger lines with keyword <newline> =>

Commit 2179133 (in 5.19.2) modified the parser to look past newlines
when searching for => after a keyword.  In doing so, it stopped the
parser from saving lines correctly for the debugger:

$ PERL5DB='sub DB::DB{}' perl5.18.1 -detime -e'=>;' -e 'print @{"_<-e"}'
sub DB::DB{};
time
=>;
print @{"_<-e"}
$ PERL5DB='sub DB::DB{}' perl5.19.3 -detime -e'=>;' -e 'print @{"_<-e"}'
sub DB::DB{};
=>;
print @{"_<-e"}

Notice how line 1 is missing in 5.19.3.

When peeking ahead past the end of the line, lex_read_space does need
to avoid incrementing the line number from the caller’s (yylex’s) per-
spective, but it still needs to increment it for lex_next_chunk to put
the lines for the debugger in the right slot.  So this commit changes
lex_read_space to increment the line number but set it back again
after calling lex_next_chunk.

Another problem was that the buffer pointer was being restored for a
keyword followed by a line break, but only if there was *no* fat arrow
on the following line.
Refactor some parser.t line number tests

The check() function is designed to check the file set by #line, but
the last half dozen tests have no need to test for that.  (I know
because I wrote them.)  So make a new check_line function that just
checks the line number, and have them use that.
Teach mro code about null array elements

This is part of ticket #119433.

Commit ce0d49f changed AVs to use NULL for nonexistent elements.  The
mro lookup code was not accounting for that, causing Class::Contract’s
tests to crash (and perhaps other modules, too).
toke.c:scan_const: Don’t use PL_bufptr

PL_bufptr is passed in as an argument, yet scan_const was some-
times looking at its argument (start) and sometimes using PL_bufptr
directly.  This is just confusing.
perldelta - Fill in some TODOs, wrap lines etc.
Store the match vars in mg_len instead of calling atoi() on mg_ptr.

The match variables $1, $2 etc, along with many other special scalars, have
magic type PERL_MAGIC_sv, with the variable's name stored in mg_ptr. The
look up in mg.c involved calling atoi() on the string in mg_ptr to get the
capture buffer as an integer, which is passed to the regex API.

To avoid this repeated use of atoi() at runtime, change the storage in the
MAGIC structure for $1, $2 etc and $&. Set mg_ptr to NULL, and store the
capture buffer in mg_len. Other code which manipulates magic ignores mg_len
if mg_ptr is NULL, so this representation does not require changes outside
of the routines which set up, read and write these variables.
(Perl_gv_fetchpvn_flags(), Perl_magic_get() and Perl_magic_set())
Store all other match vars in mg_len instead of mg_ptr/mg_len.

Perl_gv_fetchpvn_flags() now stores the appropriate RX_BUFF_IDX_* constant
in mg_len for $` $' ${^MATCH} ${^PREMATCH} and ${^POSTMATCH}
This makes some code in mg.c unreachable and hence unnecessary; the next
commit will remove it.
Remove now unused $` $' ${^MATCH} ${^PREMATCH} ${^POSTMATCH} code.

The previous commit's changes to Perl_gv_fetchpvn_flags() rendered this
code in Perl_magic_get() and Perl_magic_set() unreachable.
Simplify some code in Perl_magic_get() and Perl_magic_set().

Remove the checks that avoided confusing $^P, ${^PREMATCH} and ${^POSTMATCH}
now that the latter two do not take that code path. Remove a similar
check for $^S added by commit 4ffa73a366885f68 (Feb 2003). (This commit did
not add any other variable starting with a control-S.) This eliminates all
uses of the variable remaining.

Move the goto target do_numbuf_fetch inside the checks for PL_curpm, as
both its comefroms have already made the same check.
Add a perldelta entry for the changes to the internals of match variables.
Merge the changes to the internals of match variables.
Don’t assume targs are contiguous for ‘my $x; my $y’

In commit 18c931a3, the padrange optimisation was prevented from mak-
ing this assumption for ‘my ($x,$y)’, but the assumption was still
there in the code that combines multiple statements into one.

This would lead to assertion failures (or, as of ce0d59f, crashes
under non-debugging builds) if a keyword plugin declined to handle
the second ‘my’, but only after creating a padop.

This fixes a regression from 5.16 affecting Devel::CallParser under
threaded builds.
t/op/for.t: Skip a test if the require for XS::APItest fails
toke.c: Clarify comment
Another reason for home-grown kill() on VMS.

For some time now Perl has provided its own kill() function on VMS
due to various problems with the system-supplied one, notably that
when called from within a signal handler, the second signal never
got delivered.  This has at long last been corrected in the OS
as of the VMS84I_SYS V3.0 ECO.

But this exposes another problem with the CRTL's kill(), which is
that when called with a signal value of 0 it actually kills the
running program instead of restricting itself to error checking
as the standard requires.  This turns out to be documented behavior
and the documented workaround is to define the _POSIX_EXIT macro.

However, universally changing the behavior of the exit() function
in order to prevent

  kill(getpid(),0);

from bringing down the program that calls it doesn't seem like the
right trade-off.  So just add one more condition to the list of
conditions under which we'll use our own kill().
Sync core with CPAN version.pm release

Remove pointless diag lines, which were more trouble than they were
worth.  Add code to ensure that SV's with magic are handled properly,
and include a test for it as well.  A couple of whitespace changes and
one last set of I32 -> SSize_t upgrade for array indices.
version has been upgraded from version 0.9903 to 0.9904
Carp-1.32 has been released to CPAN
Restore perlrepository.pod in stub form

Give Perl doc sites a sane ‘latest’ version to display, directing readers
to current information, rather than showing the Perl 5.12 version in
perpetuity.

And help anybody typing man perlrepository find where the docs have moved
to.

Suggested by Father Chrysostomos in:
http://www.nntp.perl.org/group/perl.perl5.porters/2013/09/msg207079.html
[perl #119481] Check SvVALID for !SvSCREAM, skip PAD

SVpad_NAME = SVp_SCREAM|SVpbm_VALID
Subsequently OUR, TYPED and STATE pads all have SVp_SCREAM set.
SVpad_NAME shares the same bit with SVpbm_VALID, so avoid checking
PADs for SVpbm_VALID.