On Win32 run autodoc.pl and pod/perlmodlib.PL using miniperl, not perl.

*nix and VMS both use miniperl to run these two build scripts. This makes
Win32 consistent.

This eliminates the last two uses of the ICWD macro, so eliminate it too.
Refactor ExtUtils::Embed to work with miniperl.

Remove the use of FileHandle, which relies on IO, and XS module.
Only load Getopt::Std if it is needed (in xsinit()), to avoid needing to add
Getopt::Std to lib/buildcustomize.pl
Require File::Spec instead of using it, as it exports nothing, so there is no
benefit to using it (but it costs a BEGIN block).
Propagate bugfixes from {mini,}perlmain.c into ExtUtils::Embed.

xs_init() must pass a static char* when creating &DynaLoader::boot_DynaLoader
(commit 1b77350017006d9e)

Avoid linker errors on Win32 by including perlapi.h (via XSUB.h)
(commit 3ecadf9633330795)

my_perl might be unused
(commit 96a5add60f1f39d3)
Tweak ExtUtils::Embed's generated C code to be closer to ExtUtils::Miniperl.

Use #include "..." instead of #include <...> in xsi_header(), and don't add
a trailing newline (and add a newline in xsinit() to compensate).
Use four spaces instead of a tab for indenting.
If there are no extensions and hence no calls to newXS() don't declare file[]
and don't add a trailing newline.
Refactor ExtUtils::Miniperl to use ExtUtils::Embed.

There is now only one copy of Perl code to generate the C for an xsinit()
function.

This also eliminates ExtUtils::Miniperl::canon(), which was not exported, and
is no longer needed.
Refactor xsinit generation code in ExtUtils::Embed.

Remove tautological comments about loading modules.
Simplify xsi_protos() and static_ext().
canon('/','DynaLoader') is just 'DynaLoader' so inline the constant.
Refactor canon() to consistently use 1 regex pattern delimiter, avoid map
in void context, and teach it that extensions can be in 'dist' and 'cpan' as
well as 'ext'.
Remove obsolete C<require 5.002> statement.
Refactor ExtUtils::Embed::xsi_{protos,body} to use a scalar $retval.

Previously the code was accumulating the return value by pushing lines
onto an array @retval, then joining it to a single scalar on return.
As nothing needs the individual lines, reduce the complexity by concatenating
directly to a scalar.
Use more semantic markup in the Pod for ExtUtils::Embed.

Instead of B<> use F<> for filenames.
Instead of B<> use C<> for code.
Instead of B<> use I<> for parameter names.
Instead of F<> use C<> for e-mail addresses.

Remove semantically unnecessary blank lines, and trailing spaces from edited
lines.
ExtUtils::Miniperl::writemain()'s first argument can also be a filename.

Treat a reference to a scalar as the name of a file to open for output.
Any other reference is used as an output filehandle.
Otherwise the default remains to write to STDOUT.
Change the *nix and VMS Makefiles to to pass a filename to writemain().

Adding a first argument as a reference to the filename "perlmain.c" makes
ExtUtils::Miniperl::writemain() open and close the file for us. This is
safer than having the Makefile create the file using output redirection as
that can create an empty file if compilation aborts. This change means that
the file is only moved into place with the correct name if it has been
written completely without error. If an error happens the file is not
created, the make aborts, and any subsequent make will re-attempt to create
the file, instead of continuing with an incorrect file, hiding the real
cause of the problems.
Describe the changes to ExtUtils::{Embed,Miniperl} in perldelta.
Merge the refactoring of ExtUtils::Miniperl and ExtUtils::Embed.
add entries to various .gitignore files for Win32 builds

win32/html and cpan/Module-Build/t/install_test* generate dozens of
non-versioned files on a Win32 build which makes committing cumbersome
method.t: Correct miniperl skip count

210fdecd missed this.
Update Getopt-Long to CPAN version 2.41

  [DELTA]

Changes in version 2.41
-----------------------

* Change INSTALLDIRS to site for perl >= 5.011.

  See https://rt.perl.org/rt3//Ticket/Display.html?id=116479
  for details.
Better document setlocale, "use locale" interactions

The POSIX::setlocale() documentation failed to mention that "use locale"
is also usually necessary.