op.c:ck_open: Make hint lookup conditional on HINT_LOCALIZE_HH

This makes this just a teeny tiny bit faster.

HINT_LOCALIZE_HH will have been set in PL_hints if %^H has anything
in it.  So bypass the hash lookup altogether if that flag is not set.
pp_sort.c: Remove useless assignments; reduce var scope

6cda7db16df9 stopped the value of the stash variable from being used,
so there is no longer any need to assign to it.  sv_2cv, however,
requires an HV ** argument, so we cannot eliminate it completely.
mg.c: Fix misuse of AvARRAY in defelem_target

defelem magic does not usually apply to tied arrays, but an array can
be tied after a defelem has been created and points to it.  The code
for handling deferred elements was never updated for tied arrays when
those were added, so it still does AvFILL and AvARRAY.

AvFILL works on tied arrays, and calls FETCHSIZE.  But AvARRAY
accesses the AV’s internal structure.  So AvFILL might suggest that
the index is within the array, whereas it is actually past the end
of AvARRAY.

By tying the array after a deferred element with a high index has been
created and then extending the tied array (so AvFILL returns a big
number), we can make AvARRAY[big number] crash.

This script:

use Tie::Array;
sub {
  tie @a, "Tie::StdArray";
  $#a = 20000;
  warn pre;
  "$_[0]";
  warn post
}->($a[10000]);

gives this output:

pre at -e line 5.
Segmentation fault: 11

For tied arrays, we need to use av_fetch, rather than AvARRAY.
ｓｕｂ　ＮＥＧＡＴＩＶＥ＿ＩＮＤＩＣＥＳ； + ＄ｔｉｅｄ［－１］ = crash

This code in av.c, when trying to find $NEGATIVE_INDICES, was doing a
direct stash element lookup--instead of going through the normal GV
functions--and then expecting the returned value to be a GV.

‘sub NEGATIVE_INDICES’ creates a stash element that is a PV, not a GV,
so it’s easy to make things crash.
hv.h: missing macro parentheses

Let’s defuse this time bomb before it causes problems.
gv.c: Tweak API docs

Consistent spaces after dots
Some grammar corrections (by no means sufficient, though)
Remove a sentence about ‘name’ being writable.  It has been a const
char * since these docs were added in 954c1994.
Check that stash entries are GVs when aliasing pkgs

$ perl5.18.1 -e '$Foo::{"Bar::"} = 0; $Bar::Bar::; *Bar:: = *Foo::'
Segmentation fault: 11

That $Foo::{"Bar::"} = 0; assignment is documented as having unde-
fined behaviour, but it shouldn’t crash.
Make mro code pass precomputed hash values

where possible

This involved adding hv_fetchhek and hv_storehek macros and changing
S_mro_clean_isarev to accept a hash parameter and expect HVhek_UTF8
instead of SVf_UTF8.
Stop CORE::GLOBAL::do lookup from crashing on stub

‘sub CORE::GLOBAL::do;’ doesn’t create a full glob, but cheats
for efficiency.  Compilation of do-file ops was not taking this
into account.
Stop CORE::GLOBAL::glob lookup from crashing on stub

‘sub CORE::GLOBAL::glob;’ doesn’t create a full glob, but cheats for
efficiency.  Compilation of glob ops was not taking this into account.
Stop CORE::GLOBAL::require lookup from crashing on stub

‘sub CORE::GLOBAL::require;’ doesn’t create a full glob, but cheats
for efficiency.  Compilation of require ops was not taking this
into account.
op.c: Abstract common override code
op.c: Avoid vivifying CORE::GLOBAL:: globs unnecessarily

If we know the upgraded glob is not going to have the IMPORTED_CV
flag, we can avoid upgrading it.