OS X: Escape path given to -isysroot flag

Ensure that paths containing spaces or other special characters are
escaped correctly on the command line.
Ninja: Cache target-level flags

Instead of figuring out target flags per-source file, cache the flags
that are being used. This results in a *much* faster generate time for
Ninja.
Merge topic 'osx-sysroot-escape'

77b2e6f1 OS X: Escape path given to -isysroot flag
Merge topic 'dev/ninja-speedup'

26762e16 Ninja: Cache target-level flags