cmake: Link flags are now actually set.
cmake: mswin targets now statically link everything.

If we don't -static everything, libwinpthread-1.dll -always- dlinks,
even if we specify it manually to link statically. If we get to the
point where we have to distribute libs, then we can rever this and
ship the dlls. Until then, this would be the only lib we would ship,
and slinking on windows is safe, so just slink there.
build.bash: Toolchain now resets properly.

The toolchain param was not local and not being reset, so, once set,
it would stay set, propagating through other builds. Seeing a linux
build come up as a PE32 was interesting.
Unit test updates.

- Unit tests will now run automatically for xcomp targets if an
emulator is available. We may massage this if we have a really slow
emulator, like firing up a virtual machine. For wine, however, this
is very useful.