Lots of C optimizations for both speed/correctness

Clean up a lot of the less efficient uses of various Perl
macros and functions, mostly from bulk88@hotmail.com.  Also
deal with the fact that older Perl's were not handling locale
setting in a consistent manner.  This means going back to the
less efficient but always correct method of ALWAYS copying the
old locale and switch to C and then restoring, for all Perl
releases prior to 5.19.0.  Discontinue support for Perl's prior
to v5.6.2.
Explicit ENTER/LEAVE block for upg_version
Maintainers.pl: vutil.c is not customized any moer
regen customized.dat
diag.t: More exceptions