win ninja: Refactor manifest generate and embed to be 1-pass

The 'normal' way to do manifests is to have link generate a manifest
based on gathering dependencies from the object files, then merge that
manifest with other manifests supplied as sources, convert the merged
manifest to a resource, and then *relink*, including the compiled
version of the manifest resource. This breaks incremental linking, and
is generally overly complicated.

Instead, we merge all the manifests provided (along with one that
includes what would normally be in the linker-generated one, see
msvs_emulation.py), and include that into the first and only link.
We still tell link to generate a manifest, but we only use that to
assert that our simpler process did not miss anything.

R=thakis@chromium.org, yukawa@chromium.org
BUG=chromium:324863

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1813 78cadc50-ecff-11dd-a971-7dbc132099af
win ninja: default to embedding manifest to match msvs

And add a test for this specific variation.

R=thakis@chromium.org
BUG=chromium:326030

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1814 78cadc50-ecff-11dd-a971-7dbc132099af
Use gyp.common.EnsureDirExists() in more places.

No intended behavior change.

R=scottmg@chromium.org

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

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