Remove leftover Windows 95 / Windows NT4 support code

We only support building or running on Windows 2000 or higher, as of the
Windows 95 Chainsaw Massacre commit (8cbe99e5b6). These three chunks of
code escaped the massacre, but the chainsaw has finally caught up with them
now.
Remove spurious assert

kid is always dereferenced before the assert.
tweak pp_entersub

liberally sprinkle some LIKELY()s, initialise gimme closer to where
it's first needed, and shortcut the common case of a GV with valid CV,
skipping the switch statement.

With gcc and x86_64, this reduces the code size of the function by
about 5%.
pp_entersub(): re-indent block

the previous commit wrapped a switch statement in an if(), so re-indent
accordingly. Whitespace-only change.
pp_entersub(): assign CvDEPTH to a local var

stop repeatedly retrieving it
pp_entersub(): tweak some vars

make the scope of item be smaller;
don't assign +1 to MARK when we will shortly overwrite it;
use a local var to to store &GvAV(PL_defgv) to avoid recalculating it
use a _NN variant of SvREFCNT_inc

Shaves 2% off the object size of pp_entersub.
move PL_defgv nearer the top of intrvar.h

on the grounds that its a reasonably hot variable.
pp_entersub(): simplify XSUB arg cleanup code

The code that reduces the returned XS args to 1 arg in scalar context
was a bit messy. This makes it smaller, more comprehensible, with slighylu
smaller object size.
don't set SvPADTMP() on PADGV's

Under threaded builds, GVs for OPs are stored in the pad rather than
being directly attached to the op. For some reason, all such GV's were
getting the SvPADTMP flag set. There seems to be be no good reason for
this, and after skipping setting the flag, all tests still pass.

The advantage of not setting this flag is that there are quite a few
hot places in the code that do

    if (SvPADTMP(sv) && !IS_PADGV(sv)) {
        ...

I've replaced them all with

    if (SvPADTMP(sv)) {
        assert(!IS_PADGV(sv));
        ...

Since the IS_PADGV() macro expands to something quite heavyweight, this is
quite a saving: for example this commit reduces the size of pp_entersub by
111 bytes.
[MERGE] optmise pp_entersub code

Do various bits of minor fiddling with the code of Perl_pp_entersub
to make the binary smaller and hopefully faster. All the usual stuff:
sprinkling LIKELY(), altering scope of vars etc.

All of this should make no functional difference, expect conceivably the
"SvPADTMP() not on IS_PADGV()" change (which also affects code outside
pp_entersub()).

This series of commits reduces the size of the pp_entersub object on gcc
x86_64 by about 11%, and shows no measurable change in performance (i.e.
noise dominates).
make OP_AELEMFAST work with negative indices

Use aelemfast for literal index array access where the index is in the
range -128..127, rather than 0..255.

You'd expect something like $a[-1] or $a[-2] to be a lot more common than
$a[100] say. In fact a quick CPAN grep shows 66 distributions
matching /\$\w+\[\d{3,}\]/, but "at least" 1000 matching /\$\w+\[\-\d\]/.
And most of the former appear to be table initialisations.
add aux_flags field to HVs with aux struct

Add an extra U32 general flags field to the xpvhv_aux struct (which is
used on HVs such as stashes, that need extra fields).

On 64-bit systems, this doesn't consume any extra space since there's
already an odd number of I32/U32 fields. On 32-bit systems it will consume
an  extra 4 bytes. But of course only on those hashes that have the aux
struct.

As well as providing extra flags in the AUX case, it will also allow
us to free up at least one general flag bit for HVs - see next commit.
gv_check(): use aux flag rather than IsCOW

Currently the SVf_IsCOW flag doesn't have any meaning for HVs,
except that it is used in the specific case of gv_check() to temporarily
mark a stash as being scanned. Since stashes will have the HV_AUX fields,
we can use a flags bit in the new xhv_aux_flags field instead.

This then potentially frees up the SVf_IsCOW for use as a new general flag
bit for *all* HVs (including non-stash ones).
Document what the gv_check() function does
speed up (non)overloaded derefs

Consider a class that has some minimal overloading added - e.g. to give
pretty stringification of objects - but which *doesn't* overload
dereference methods such as '@[]'. '%[]' etc.

In this case, simple dereferencing, such as $obj->[0] or  $obj->{foo}
becomes much slower than if the object was blessed into a non-overloaded
class.

This is because every time a dereferencing is performed in pp_rv2av for
example, the "normal" code path has to go through the full checking of:

  * is the stash into which the referent is blessed overloaded? If so,
  * retrieve the overload magic from the stash;
  * check whether the overload method cache has been invalidated and if so
    rebuild it;
  * check whether we are in the scope of 'no overloading', and if so
    is the current method disabled in this scope?
  * Is there a '@{}' or whatever (or 'nomethod') method in the cache?
    If not, then process the ref as normal.

That's a lot of extra overhead to decide that an overloaded method doesn't
in fact need to be called.

This commit adds a new flag to the newish xhv_aux_flags field,
HvAUXf_NO_DEREF, which signals that the overloading of this stash
contains no deref (nor 'nomethod') overloaded methods. Thus a quick check
for this flag in the common case allows us to short-circuit all the above
checks except the first one.

Before this commit, a simple $obj->[0] was about 40-50% slower if the
class it was blessed into was overloaded (but didn't have deref methods);
after the commit, the slowdown is 0-10%. (These timings are very
approximate, given the vagaries of nano benchmarks.)
[perl #121230] fix kill -SIG on win32

v5.17.1-137-gc2fd40c tidied up perl's kill() implementation, making
-SIGNAME be handled correctly, It also eliminated the use of the killpg()
system/library call, which these days is usually just a thin wrapper over
kill(). By doing this, it assumed that the following are functionally
equivalent:

 killpg(pgrp, sig)
 kill(-pgrp, sig).

Unfortunately this broke Window's use of the (perl-level)

    kill negative_value, pid, ...

since under Windows, the killpg()/kill() identity doesn't hold
(win32_kill() uses negative ids for fake-PIds, not process groups).

Fix this by restoring the use of killpg() where available.
copy xhv_rand and xhv_last_rand in threads clone

valgrind complains about these fields being uninitialised when cloned into a
new thread, because they aren't copied. It's fairly harmless, since these
fields are just used to perturb hash key iteration; but for completeness,
clone these fields too.
S_regmatch(): merge BOL and SBOL branches

The code body is the same for both of them.
SAVEt_CLEARSV: check common flags

In the 'clear' branch of SAVEt_CLEARSV, there are several individual
if (SvSOMEFLAG(sv)) {...} tests. Wrap all these tests in a single
if (SvFLAGS(sv) & (union|of|all|flags)), so that for the common case
of boring lexicals that don't need special clear up, we can skip all the
individual tests
SAVEt_CLEARSV: reindent after previous commit

whitespace-only changes