nicer build.ninja on windows
Free cache memory once it's no longer used.

Doesn't slow down empty build times measurably, and
saves some memory on non-empty builds.