ninja/mac: Support multi-arch builds via ARCHS

The basic design is that actions, rules, and copies run exactly like before
(only once per target, even if there are multiple archs).

Every source file is compiled once per arch, and depending on the target type
all object files of a single arch are then linked into a single-arch binary or
collected into a single-arch static library.

These binaries / libraries are then merged into a final fat binary / library
by an additional build step (for binaries, this is done with "lipo", static
libraries can be assembled with the existing libtool rule). Postbuilds will
only see the final fat binary.

One small wrinkle is that postbuilds should run just once per target, so some
minor bookkeeping needs to be done that they only end up on the last build edge
of a target: For non-bundles, that's the new lipo or the final libtool
invocation. For bundles, it stays the "package bundle" step.

Since compiles for every arch need slightly different cflags (at least a
different -arch parameter), the cflags for each arch need to be in a new scope.
The only way ninja currently supports variable scoping is via subninja files,
so this patch writes one subninja file per arch to contain the per-arch
compile and link/alink rules.

If a target contains only one arch (always the case on non-mac at the moment,
and also true for the vast majority of targets on mac), the output stays as
it currently is: cflags go into the target's ninja file, there isn't a single
subninja file.

Implementation-wise, NinjaWriter.archs contains a list of all archs of the
current target (e.g. ['i386', 'x86_64']), and if there are more than 1 arch then
NinjaWriter.arch_subninjas is a dict mapping arch to a ninja_syntax.Writer()
for the subninja file belonging to that arch. link_deps is a dict of
arch -> link_deps list if there is more than one arch.

To make sure that a bundle doesn't end up with both a fat binary and the
constituent thin binaries all in the bundle, the thin binaries are written
to out/Default/arch/i386/binary and so on, and only the fat binary is written
into the bundle.

This supports only ARCHS, things like ONLY_ACTIVE_ARCH aren't implemented for
now. Also, this is only for the ninja generator, not for the make generator.

gyp still doesn't do conditional xcode_settings, so stuff like 
'OTHER_LDFLAGS[arch=armv7]' still doesn't work.

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

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1692 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/mac: Warn on conditional keys.

Now that ARCHS is supported, someone might try to use FOO[arch=i386], that
shouldn't fail silently.

BUG=chromium:122592,chromium:90185
R=scottmg@chromium.org

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

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