Re-land r1745: "Add an option to prune targets"

BUG=
R=mark@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1772 78cadc50-ecff-11dd-a971-7dbc132099af
Fix parallel execution, and enable by default

Fix a few issues with parallel execution:
- exit code 1 on failure
- print a useful backtrace (it looks like a regular non-parallel gyp backtrace now)
- make output match non-parallel gyp more closely
- close() and join() multiprocessing.Pool properly on completion to avoid shutting down during garbage collection when the context is already gone. Avoids occasional stderr output "Exception RuntimeError: RuntimeError('cannot join current thread',) in <Finalize object, dead> ignored".

Instead of setting a callback for filelists, pass the paths required to build the filelist path. This lets multiprocessing pass the required data to subprocesses.

And, since tests now pass, turn on by default.

The command line flag is kept and inverted to --no-parallel which is used for running tests in "gypd" format. Those are dumps of the internal state, and when the input files are parsed in parallel the ordering in the dicts changes. This only applies to 4 tests in the test/variables/ subdirectory.

The GYP_PARALLEL environment variable is no longer referenced.

For Chromium on Windows, this reduces build\gyp_chromium time from 1m13s to 36s.

R=dmazzoni@chromium.org, thakis@chromium.org
BUG=309824,154205

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

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