Proposed/fix redundant restat with deps ticket 652

Fixing https://github.com/martine/ninja/issues/652