(#11276) Write to the console using Unicode Win32 APIs

Previously, puppet on windows could not output unicode characters to the
console reliably, such as the box drawing characters used by the module
tool when displaying dependencies.

Ruby 1.8 uses the ANSI Win32 APIs, e.g. WriteConsole, to write to the
console. However, it uses the current console codepage, so if the current
codepage cannot handle the unicode character we're trying to write, e.g.
cp1252 can't handle module tool output, then it displays garbage.

Ruby 1.9 uses the Unicode Win32 APIs, e.g. WriteConsoleW. As such, it can
currently write unicode output, without being sensitive to the current
codepage. However, it is dependent on the font being used to render the
output. For example, Lucida Console works, but raster based fonts may not.

However, because puppet writes ANSI escape sequences, we use the
win32console gem to color the output. This win32console gem redefines the
stdout and stderr streams to accomplish this, and sadly uses ANSI versions
of Win32 APIs to write to the console. As such it has the same problems
that ruby 1.8 does.

This commit overrides the win32console classes, Console and IO, to ensure
the Unicode APIs are used. This enables us to display ANSI escape
sequences and unicode characters that may not be compatible with the
current codepage.

Longer term we should think about removing win32console gem altogether and
moving to ruby 1.9, as these hacks could then be removed, at the expense
of losing color output.

fixup with console change
(#11276) Implement cacerts on windows

On Windows calling OpenSSL::X509::Store#set_default_paths does nothing, as
there is no `cacerts` package. As a result, the module tool is unable to
make authenticated SSL connections to the forge.

This commit adds a CACerts module that extracts the root certs from the
Microsoft system cert store, and monkey patches the
OpenSSL::X509::Store#set_default_paths to behave as expected on Windows --
each root cert is added as a trusted cert capable of authenticating the
SSL server.

This commit is structured this way, because the module tool makes SSL
connections in two completely different ways. When requesting dependency
information, the module tool sets up the SSL context, e.g. sets the
VERIFY_PEER flag, etc.  However, when downloading the tar.gz content, it
uses the open-uri gem, which has it's own implementation for setting up
the SSL context. It calls the `set_default_paths` method to add the
path of trusted cacerts to the cert store.

And this is true of any module that uses open-uri to make authenticated
SSL connections to third-party SSL servers, i.e. not the puppetmaster. As
a result, it seems "best" to monkey patch openssl.
(#11276) Enable module tool on Windows

This commit allows the module tool to run on windows and updates the spec
tests as they are no longer pending.