Quick fix for gen_java/gen_python in codegen.  I ran into issues with running codegen because the task was trying to access the build graph during its __init__.

Testing Done:
CI passes

Reviewed at https://rbcommons.com/s/twitter/r/400/
Add non-closure injection methods to BuildGraph

This came up for optimizing an internal implementation of WhatChanged.

Testing Done:
CI passes

Reviewed at https://rbcommons.com/s/twitter/r/399/
Name codegen synth targets by target id, instead of name.

Before, we were just getting lucky that we didn't have two colliding target names for our codegen targets, but their synthetic targets should be 1:1 with their (language, build file target) tuple.

Testing Done:
CI passes

Bugs closed: https://github.com/pantsbuild/pants/pull/148

Reviewed at https://rbcommons.com/s/twitter/r/398/
doc: pants.new.rc is old, pants.rc is new

Bugs closed: https://github.com/pantsbuild/pants/issues/137

Reviewed at https://rbcommons.com/s/twitter/r/401/
Fix publishing and also add integration tests

Fix publishing errors
1. Fix no config javadoc found for targets with no depdencies.
==== stderr ====
                     Exception in thread "main" java.text.ParseException: Problem occurred while parsing ivy file: Cannot add artifact 'example.jar(javadoc)' to configuration 'javadoc' of module com.twitter#example;0.0.1-SNAPSHOT because this configuration doesn't exist! in file:/Users/tdesai/projects/pants/.pants.d/publish/publish/com.twitter/example/ivy-0.0.1-SNAPSHOT.xml

2. Add Integration tests

Testing Done:
locally:
 ./pants tests/python/pants_test/tasks:jar_publish_integratio
tests/python/pants_test/tasks/test_jar_publish_integration.py ..

============================================================================= 2 passed in 23.32 seconds =============================================================================
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/private/var/folders/t_/ck6c3zvj2z5cg77dqx2kh8tr0000gp/T/tmpKYikI8/.deps/twitter.common.dirutil-0.3.0-py26-none-any.whl/twitter/common/dirutil/__init__.py", line 61, in _mkdtemp_atexit_cleaner
    for td in _MKDTEMP_DIRS.pop(os.getpid(), []):
AttributeError: 'NoneType' object has no attribute 'pop'
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "/private/var/folders/t_/ck6c3zvj2z5cg77dqx2kh8tr0000gp/T/tmpKYikI8/.deps/twitter.common.dirutil-0.3.0-py26-none-any.whl/twitter/common/dirutil/__init__.py", line 61, in _mkdtemp_atexit_cleaner
    for td in _MKDTEMP_DIRS.pop(os.getpid(), []):
AttributeError: 'NoneType' object has no attribute 'pop'
tests.python.pants_test.tasks.jar_publish_integration                           .....   SUCCESS
[tw-172-25-20-142 pants]$ ./pants tests/python/pants_test/tasks:jar_publish_integration
Build operating on targets: OrderedSet([PythonTests(tests/python/pants_test/tasks/BUILD:jar_publish_integration)])

Bugs closed: 120

Reviewed at https://rbcommons.com/s/twitter/r/356/
dev docs: += some debugging advice from a mail thread

Reviewed at https://rbcommons.com/s/twitter/r/404/
Author: Tejal Desai <tejal29@gmail.com>
Date:   Fri May 23 13:17:18 2014 -0700

    Fix publishing and also add integration tests

    Fix publishing errors
    1. Fix no config javadoc found for targets with no depdencies.
    ==== stderr ====
                         Exception in thread "main" java.text.ParseException: Problem occurred while parsing ivy file: Cannot add artifact 'example.jar(javadoc)' to configuration

    2. Add Integration tests

    Testing Done:
    locally:
     ./pants tests/python/pants_test/tasks:jar_publish_integratio
    tests/python/pants_test/tasks/test_jar_publish_integration.py ..

    ============================================================================= 2 passed in 23.32 seconds =======================================================================
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/private/var/folders/t_/ck6c3zvj2z5cg77dqx2kh8tr0000gp/T/tmpKYikI8/.deps/twitter.common.dirutil-0.3.0-py26-none-any.whl/twitter/common/dirutil/__init__.py", line 61, i
        for td in _MKDTEMP_DIRS.pop(os.getpid(), []):
    AttributeError: 'NoneType' object has no attribute 'pop'
    Error in sys.exitfunc:
    Traceback (most recent call last):
      File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/atexit.py", line 24, in _run_exitfuncs
        func(*targs, **kargs)
      File "/private/var/folders/t_/ck6c3zvj2z5cg77dqx2kh8tr0000gp/T/tmpKYikI8/.deps/twitter.common.dirutil-0.3.0-py26-none-any.whl/twitter/common/dirutil/__init__.py", line 61, i
        for td in _MKDTEMP_DIRS.pop(os.getpid(), []):
    AttributeError: 'NoneType' object has no attribute 'pop'
    tests.python.pants_test.tasks.jar_publish_integration                           .....   SUCCESS
    [tw-172-25-20-142 pants]$ ./pants tests/python/pants_test/tasks:jar_publish_integration
    Build operating on targets: OrderedSet([PythonTests(tests/python/pants_test/tasks/BUILD:jar_publish_integration)])

    Bugs closed: 120

    Reviewed at https://rbcommons.com/s/twitter/r/356/
A fast test-running mode for python tests.

Runs all tests in a single chroot instead of creating one per test target.

Benefits:
  1) The pants tests run in 12 seconds instead of 160 seconds.
  2) Test isolation can actually hide problems sometimes.

Drawbacks:
  Individual chroots are better for verifying that a test
  target's dependencies are self-contained, i.e., that they
  reflect all the actual deps. When running multiple tests
  in a single chroot, test B could provide a dep that test A
  relies on but doesn't declare, thus hiding a missing dep
  problem.

This drawback is minor - it only verifies that the test target's
deps are good, not the deps of the target being tested.
Squashed commit of the following:
    improve detect-duplicates to detect dups in internal dependencies
    This reverts commit 24cc65dbae0b29db4dc6c4f7ffb1b9cb8d41f87d.
un-deprecate jar_library

http://pantsbuild.github.io/build_dictionary.html#jar-library says jar_library is just an old name for "dependencies". But everything old is new again.

Reviewed at https://rbcommons.com/s/twitter/r/409/