ninja: Collapse rule inputs into a single node when it makes sense.

Before this CL, if a rule matched N source files and had M inputs, the inputs
where repeated for every build edge, hence showing up N * M times in the
generated ninja file.

After this, gyp instead writes a single stamp node depending on all the inputs
and makes every source rule edge depend on this stamp file, reducing the number
of times they show up in the generated ninja file to N + M. (Also bake
order-only deps into this new node.)

No behavior change. Reduces the size of individual_generated_bindings.ninja
from 4.5MB to 401kB, and the size of all generated ninja files in chromium
from 15.1MB to 10.9MB. This in turn speeds up empty builds by 60ms on my
SSD laptop and by probably over 0.1s on my HDD desktop (didn't try that due
to lack of travel desktop though).

BUG=chromium:350317
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/203193003

git-svn-id: http://gyp.googlecode.com/svn/trunk@1879 78cadc50-ecff-11dd-a971-7dbc132099af