GTTF: Print much better error message for dependency cycles.

Example:

gyp: Cycles in .gyp file dependency graph detected:
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> build/linux/system.gyp

BUG=chromium:35878

Patch by Paweł Hajdan Jr. <phajdan.jr@chromium.org>


git-svn-id: http://gyp.googlecode.com/svn/trunk@1695 78cadc50-ecff-11dd-a971-7dbc132099af
Back out r1695 because it caused GYP bot test failures:

http://build.chromium.org/p/tryserver.nacl/builders/gyp-linux/builds/1119

assertItemsEqual is new in Python 2.7:

http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertItemsEqual


git-svn-id: http://gyp.googlecode.com/svn/trunk@1696 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/win: Set /O2 compiler flag by default if no 'Optimization' specified

Follows behavior when using MSVS generators. If target ends up with no
'Optimization' option specified, MSVS generator will not add <Optimization>
element in the <ClCompile> parent. Visual Studio will still set /O2 compile
flag though.

Tested only in VS2012 Express.

BUG=https://code.google.com/p/gyp/issues/detail?id=361
R=scottmg@chromium.org

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

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