Rewrite mkbuildmachine for simplicity and robustness.

The previous version of this code would only work on a clean machine, lacked
error checking (e.g. the exit codes of installers were not inspected and
in fact some were failing, albeit harmlessly) and had some sophisticated
logic to check error codes. We also have some separate code in
windows/winbuild-prepare.ps1 to verify some aspects of the build machine are
suitable.

All the actual install logic here is based on the previous version, but
in addition there are checks that each step is necessary before running it.
This allows a nice simple control flow where you log in to a windows machine,
run this script, and watch it install things. You can re-run any steps
that were problematic and reboot when you like. After typically a problem
or two you'll run this script and find it thinks everything is fine. We'll
also run the script in read-only mode (without the -apply) flag before
each XT windows build.

The test code is pretty primitive, and I suggest we plan to extend it
each time we get a problem with a windows build machine, until the
test code is fairly reliable.

I'm open to the possibility of adding reboot logic and the run hooks
back in, but frankly I don't think I'd use or recommend it. Windows
build machine setup may just be too complex to happen automatically
with a complex state machine and no troubles.

There is also a mechanism here for secure hashing downloads and the
windows/PackageLibrary.psm1 file includes secure hashes of (nearly) everything
to ensure integrity and allow safe reuse of material that is alread
available.