merge upstream

this includes me refactoring stuff to make this merge better.
I successfully built base_unittests locally and also verified changing a file causes incremental build.

```
C:\Users\evmar\chrome\src>ninja -d stats -C out\Debug base_unittests
ninja: Entering directory `out\Debug'
[2/2] LINK base_unittests.exe
metric                  count   avg (us)        total (ms)
.ninja parse            843     2021.9          1704.5
canonicalize str        139364  0.0             0.0
canonicalize path       139364  0.0             0.0
lookup node             187273  0.0             0.3
.ninja_log load         1       2785.0          2.8
node stat               1879    18.2            34.2
depdb load              635     46.3            29.4

path->node hash load 0.15 (39437 entries / 262144 buckets)
```
(Note: debug binary, just inlclude this info to show the counts)