ninja/mac: Only write pch flag variables if needed.

No intended functionality change:
These variables are empty in the majority of targets, they aren't defined in
the toplevel ninja file, and ninja expands undefined variables as empty strings.
Reduces ninja file line count by ~3000 for chromium (of 148000, so it's
only a 2% reduction).

Likewise, only write libtool_flags if they are not empty (they're _always_
empty in Chromium for example). Reduces ninja file line count by number of
static library targets (~hundreds).

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1661 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/mac: Drop a few useless "./" prefixes on built product paths.

Use `ExpandSpecial(join('$!PRODUCT_DIR', path))` instead of
`join(ExpandSpecial('$!PRODUCT_DIR'), path)`, because ExpandSpecial() knows
that a prefix of `$!PRODUCT_DIR/` can be dropped completely. The latter form
results in `./` prefixes.

No intended behavior change, just makes the generated ninja file a tiny bit
shorter and a bit more sane (for example,
https://github.com/ndmitchell/shake/commit/28be53f9c51 isn't needed after this
-- but other places in gyp still generate 'foo/..' in the middle of a path,
so that's only a small win).

R=scottmg@chromium.org

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

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