xcode_emulation: fix on CLT-only systems redux

This reimplements r1819 in a way that should avoid breaking Xcode, and
should also allow setting framework paths on CLT-only systems.

BUG=code.google.com/p/gyp/issues/detail?id=292
Review URL: https://codereview.chromium.org/118473009/
Patch from mistydemeo@gmail.com!

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1825 78cadc50-ecff-11dd-a971-7dbc132099af
_XcodeVersion: return CLT version as appropriate

If Xcode isn't installed passing the CLT version is the next best bet.
This ports the CLT version function from Homebrew, and calls it if
xcodebuild fails to run.