Add a Windows specific svn_cmdline_puts() shortcut for the direct console
output case to avoid the insanely expensive double character conversion
in the Visual C++ CRT for this specific, but for Subversion very common case.

Before:                              VM/Network WC  Host
$ svn status -v trunk              = 7.5s           5.8s
$ svn status -v trunk > file       = 0.7s           0.1s

After:
$ svn status -v trunk              = 1.3s           0.4s
$ svn status -v trunk > file       = 0.7s           0.1s

(Measured on Windows 7, 8 and 8.1 with several CRT versions >= 2008)

When locales are explicitly enabled (such as in Subversion) the Visual
C++ CRT applies a double character conversion to make the console output
identical to what DOS and Win9X would do, while the console natively supports
displaying unicode. Instead of using the standard conversion route, this
shortcut converts our utf-8 to utf-16 and sends that to the attached console.

This patch avoids the extreme performance penalty and at the same time
enables displaying all unicode characters that the console support even
when they can't be expressed in the ansi character set.

Note that you will not see any change in the test suite, as the test suite
redirects all output. It will make subversion easier to profile though,
as before this patch many performance scenarios were console io bound on
Windows.

* subversion/libsvn_subr/cmdline.c
  (includes): Add conio.h on Windows. Add win32_xlate.
  (svn_cmdline_init): Detect if stdout and/or stderr are connected to the
    console.
  (svn_cmdline_fputs): Shortcut stdout/stderr to the console when possible.

* subversion/libsvn_subr/win32_xlate.c
  (includes): Add svn_private_config.h.
  (svn_subr__win32_utf8_to_utf16): New function.

* subversion/libsvn_subr/win32_xlate.h
  (svn_subr__win32_utf8_to_utf16): New function.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1533994 13f79535-47bb-0310-9956-ffa450edef68