Fix broken expected output of catalogfunctions regression test.
Rip out broken retry/timeout logic in SOCK_wait_for_ready.

At a quick glance, the logic looked like retry with progressive timeout, but
it was horribly broken. First of all, the timeout was only used if
retry_count was passed as 0. And in that case, the timeout was 0. So
retry_count == 0 actually meant "check if data can be read/written without
blocking", while retry_count > 0 meant "sleep until data is available". There
was also some code to handle retry_count < 0, but that was dead code because
none of the callers passed a negative value.

The hardcoded max. retry count of 30 retries was quite bogus too. Filling
the output buffer more 30 times is not necessary an error, and it's not
clear that the ssl library could not return SSL_ERROR_WANT_READ or
SSL_ERROR_WANT_WRITE more than 30 times. Unlikely, yes, but possible.

So, just rip out the retry_count and progressive timeout logic. Replace
the retry_count argument with a simple "should block?" argument. I didn't
dare to remove the condition that we always wait if SSL is enabled, although
I don't understand that at all. But perhaps there's some well-hidden reason
for that.

Per report from Prakash Itnal, although this just removes the broken code,
and won't enable the kind of a timeout that he wanted.
Clean up Windows makefiles

Get rid of the CPU and CPUTYPE variables in win64.mak. Instead, assume that
the TARGET_CPU variable has been set correctly in the environment.
TARGET_CPU is set by "setenv" script that comes with the Microsoft Visual
Studio C compiler package. It never worked to pass a "CPU=x86" and using a
x64 compiler, for example, so seems better to determine the correct target
from the environment, than fail with a cryptic error message if the CPU
argument and the environment don't match. To build 32-bit binaries with
win64.mak, simply do "setenv /x86" before running "nmake -f win64.mak".
Similarly, to build 64-bit binaries, use "setenv /x64".

It should now be possible to build both 32-bit and 64-bit binaries with
win64.mak. Ideally, we could now remove win32.mak altogether, but there are
small differences between win64.mak and win32.mak in the build options that
they use. I don't understand the differences enough to dare to remove
win32.mak yet.

The CPU=AMD64 alias for x64 is no longer supported (as the whole parameter
is now gone).

Also do whitespace & other cosmetic fixes to win32.mak and win64, to make
them more similar. This helps when comparing the two with "diff".

Remove remains of the long-gone "MULTIBYTE" setting (it was misspelled in
win64.mak, anyway)
Add comments to modify_msi.vbs.

It took me quite a while to reverse-engineer what it does, and more
importantly, why. Add comment to save time for the next reader.
Remove unused cruft from Windows build files.
Remove special check for nmake version 6.00.9782.0

Surely we don't need to support that old versions anymore. Besides, it
was bizarre to check for that exact version, and not any older or newer
versions of that era.
Remove /incremental option from linker call on Windows / nmake

The linker defaults to what were passing, so should work fine without it.

Also remove an unused variable from win32.mak
Refactor win64.mak to allow passing options in local file.

Move all the default values for external library paths to
windows-defaults.mak. Add an include for file called windows-local.mak,
this allows you to put local config options in that file, which is much
easier than passing them on the command line every time.
Improve Windows compilation instructions in the docs.
Simplify win32.mak and win64.mak a little bit.

Change the way we test whether a directory exists, so that we don't need
a version check for Windows NT. (although we probably don't need to support
compiling on NT anymore anyway)
Remove obsolete Windows build files.

buildx86.ps1 and buildx64.ps1 were used to invoke the nmake makefiles, but
have been obsoleted by the scripts in winbuild/. win64.mak can be used to
build 32-bit and 64-bit binaries now, so win32.mak is no longer needed.
Rename Windows output folders, for clarity.
Fix Windows build with MSDTC=no.
Fix Debug-mode builds with win64.mak

It apparently hasn't worked for a very long time. Copy some tricks from
the already-deleted win32.mak to make it work: Use /MDd rather than /MD
when compiling in Debug mode, and replace /GZ with /RTC1, to silence a
deprecation warning from the compiler