Assume UTF-8 locale if that string occurs anywhere in name

When a platform doesn't have nl_langinfo(), heuristics are employed
to see if a locale is UTF-8 .  The first heuristic is looking at the
return value of setlocale(), which generally is the locale name.
However, in actuality the return value is opaque and can't be relied on
to signify the locale.  Nevertheless if it contains the string UTF-8
(ignoring case, and with the hyphen optional), it is a safe bet that the
locale is indeed UTF-8.  Prior to this patch, we only looked at the end
of the name for "UTF-8".  This patch makes it not have to be
right-anchored.  There are UTF-8 locales on our dromedary machine with
UTF-8 in the middle of their names.
lib/locale.t: Allow turning on debug via env

Instead of having to edit the file to turn on debug mode, additionally
allow the use of an environment variable.  This makes it more
convenient to ask someone in the field to run the test.
lib/locale.t: Add comments; clarify some test names

I had to really study what these tests were doing; the new names are
clearer.
lib/locale.t: Rename some internal elements

I have never understood what 'neoalpha' meant.  I believe it is actually
neo - alpha, But when I read it, I don't notice the 'a' and see it as
"n-end-of-line".  This renames it to something I can understand.
lib/locale.t: Add omitted test cases

The tests were failing to include caseless alphabetic characters;
many languages are not cased..
lib/locale.t: Add test name to debug output

This makes it easier to understand what is going wrong.
lib/locale.t: Better debug output

This adds infrastructure and uses it to report the individual characters
that fail tests.
lib/locale.t: Add a bunch of tests.

These test that various relationships that POSIX specifies are met in
each locale, including that a class and its complement are mutually
exclusive, that some classes are subsets of another (like [:upper:]
being a subset of [:alpha:]), and that some things can't be in two
conflicting classes (such as [:print:] and [:cntrl:]).

The tests are marked as TODO, like similar existing tests, if only a
small percentage of locales fail them.  This indicates that those
locales are defective, while Perl and most other locales are ok.
lib/locale.t: Remove useless test.

This test verified that certain things matched \w.  However the list of
those things was assembled by matching \w in the first place.  So it
tested nothing new.
lib/locale.t: Don't skip certain tests

The removed code caused tests to be skipped when the locale doesn't add
any \w characters beyond the C locale.  That meant in practice these
tests were likely skipped only for the C and POSIX locales.  The problem
is that doing this required extra complexity in figuring out how many
tests to skip.  Removing this makes the code easier to understand and
maintain.
lib/locale.t: White-space only

This outdents text and reflows comments in a now-removed block
locale.c: Rmv unused variable
locale.t: Don't show 100% pass when there are failures

This was because it only rounded to the nearest percent.  Rounding to
the nearest .1% should eliminate the problem, as there are fewer than
1000 possible locales.
lib/locale.t: Move advice output to end

This just moves a block so that the messages it generates are displayed
at the end of the locale.t output, instead of in the middle.  This makes
them more likely to be noticed.
lib/locale.t: Make suitable for testing locales sanity

This just adds some more explanatory text to the output when errors are
encountered, and causes it to not generate TODOs for failing tests under
debug mode.  These TODOs were generated when only a small percentage of
the locales have failures, thus indicating that the fault is in those
locale definitions and not Perl itself, and hence we shouldn't fail the
build because somebody's system has a few bad locale definitions.

This commit causes the failures to be real failures when under debug
mode.  Given this and the new explanatory text, this .t is suitable for
testing locales for sanity.  I'll ask p5p whether we should advertise
that fact or not.