Fix comparison of Xcode version

The methods _XcodeVersion returns a tuple with two strings (Xcode
version and Xcode build), so we should check the version against
the first value of the tuple.

BUG=None
R=mark@chromium.com

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


git-svn-id: http://gyp.googlecode.com/svn/trunk@1848 78cadc50-ecff-11dd-a971-7dbc132099af
Extract XcodeVersion to be a standalone module function

The _XcodeVersion from XcodeSettings class does not need to be a member
function as it does not use any of the field of the class. Extract it
to be a standalone function at the module level, and all the functions
it calls (that also don't use fields from XcodeSettings).

Keep the _XcodeVersion wrapper function that keeps a cache of the
values returned from Xcode to not degrade performance for clients of
the old API that may depends on that cache.

BUG=None
R=mark@chromium.org, thakis@chromium.org

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

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