Simplify implementation of GetProcessorCount().

The current implementation is unnecessarily complex, because:

- The BSD derived systems implement sysconf(_SC_NPROCESSORS_ONLN)
  in terms of sysctl({CTL_HW,HW_NCPU}).
- get_nprocs() is a GNU extension, and glibc implements
  sysconf(_SC_NPROCESSORS_ONLN) in terms of get_nprocs().
Merge pull request #647 from bmeurer/SimplifyGetProcessorCount

Simplify implementation of GetProcessorCount().
Check depslog timestamp in LoadDepsFromLog(), not in RecomputeOutputDirty().

RecomputeOutputDirty() is called from two places:

1. RecomputeDirty(), which calls LoadDeps().
2. CleanNode(), which always passes 0 for the deps mtime.

So this is no behavior change in either case.

deps_mtime was nonzero only in deps mode, and it got passed all over the
place.  This makes things simpler.
Share more code between CleanNode() and RecomputeDirty().

Move a common loop into the new function RecomputeOutputsDirty().
Simplifies things a bit, and makes it harder for the restat path to have
different behavior from the regular path.

No dramatic behavior change (the restat path now also calls
RestatIfNecessary()).
Fix restat rebuild if deps are missing.

Fixes issue #603.

Apparently, the problem was caused by my fix r "consider target dirty if
depfile is missing" (bcc8ad1), which was not working correctly with
restat rules cleaning nodes.  Switching to deps only triggered an easily
observable issue.

Fix by setting a flag in edges with invalid deps, and not cleaning edges
with that flag set.
Merge pull request #648 from nico/landmaxim

Land the majority of pull request #608.
Delete a line I failed to delete in d7a46654a7be1.
Merge pull request #649 from nico/fff

Delete a line I failed to delete in d7a46654a7be1.
Simplify.
Merge pull request #650 from nico/simplify

Simplify.