Make method lookup treat *foo as \*foo

It is possible to call a method on a typeglob with an IO thingy, as in
*ARGV->getline.  This treats the invocant as a handle and looks up its
methods in IO::File.

As of commit 7156e69, a typeglob without an IO thingy is treated
as a class:

$ ./perl -Ilib -e 'sub foo::oof { print "foof!\n" } *foo->oof'
foof!

It did not occur to me back then that globs were being stringified in
method lookup.

Before that commit, names beginning with a non-alphabetic character
were permitted for handle names, but not for package names.  That
fact, and the fact that symbol lookup in general will ignore an ini-
tial * followed by a letter, allowed *ARGV->getline to work.

For *Package->foo to work was a mistake.

It turns out, also, that the glob stringification could cause the
wrong handle to be used, e.g., after glob aliasing.  Also, a handle
whose stringification begins with * followed by a non-alphabetic char-
acter will not work, because symbol lookup does not strip * from the
stringified glob:

$ ./perl -Ilib -e '$::Foo::VERSION; package Foo; open FH, "perl"; *FH->getline'
Can't locate object method "getline" via package "*::Foo::FH" (perhaps you forgot to load "*::Foo::FH"?) at -e line 1.

This commit fixes all this inconsistency by simply not stringifying
the glob.  *FH->foo is now treated the same way as (\*FH)->foo (as it
already was in those cases where it worked).

This does allow PVLV globs to reach code that they couldn’t reach
before, so this patch has to handle those, too.  (newRV probably ought
to handle PVLVs, but it currently doesn’t.)
PATCH: [perl #38193] embedded perl always calls setlocale(LC_ALL,"")

This commit causes the locale initialization to skip calling
setlocal(foo, "") if the environment variable PERL_SKIP_LOCALE_INIT is
set.  Instead, the setup code calls setlocale(LC_ALL, NULL) (plus other
similar calls for the subcategories) in order to find out what the
current locale is.

The original poster for this ticket has a workaround for it which
involves using a modified copy of Perl core code.  This patch defines
the C preprocessor variable HAS_SKIP_LOCALE_INIT that can be used by XS
writers to discover if the current Perl version needs the workaround or
not.

I was unable to come up with a test for this patch that did not involve
building extensive infrastructure for testing embedded Perl.  That does
not seem worth it for such a trivial patch.  I tested by hand.
locale documentation: Grammaar and appearance nits
Quiet warning in a DEBUG print

The variable type is STRLEN, and the format
code is expecting a UV, so just cast it to UV
to quiet a warning.
Fix typo in perlreapi(1perl).
Add Nathan Trapuzzano to AUTHORS
Suppress system Term::ReadLine::Gnu

perl5db.t will die in Term::ReadLine if Term::ReadLine::Gnu is installed
in the system. Let's favour core implementation.

Best solution would be to prune @INC to prevent from loading already
installed modules like this:

BEGIN {
    use Config;
    @INC = grep { ! /^\Q$Config{installprefix}\E(\/|\z)/ } @INC;
}

However that is not possible (now) due to various execs (even without
proper -I) in the harness chain. perl should implement -nostdinc
option.

Signed-off-by: Petr Písař <ppisar@redhat.com>
'Prototype after' and 'Illegal character' warnings should both pretty print the prototype text.

For example, prior to this patch,
eval "sub foo (@\0) {}"
would give two warnings:

Prototype after '@' for main::foo : @ at (eval 1) line 1.
Illegal character in prototype for main::foo : @\0 at (eval 1) line 1.

In both cases, the representation which makes a NULL visible
is useful, and of course since we're printing the same warning twice,
it doesn't hurt to display it consistently.