Improved jvm compile partitioning algorithm.

Adds a heuristic to put locally-edited files
in their own partition.

See comments in code for explanation of the reasons for this.
Fix test that got broken in the shuffle.
During refactoring I introduced an indentation error in the Emma code. This patch fixes it.
docs: replace a TODO with a helpful link

seeing as how that page exists, we can link to it, yay

Reviewed at https://rbcommons.com/s/twitter/r/354/
Attempt to thin down idea project files.
Embed json used to render template in a comment.
Only render package_prefix if defined.
Debug info about SourceSet.
docs: IntelliJ. rm py-mode for BUILDs. re-order. detail for 'goal idea'

Inspired by some advice from Fedor Korotkov on the occasion of
his new IntelliJ plugin for Pants release

"Probably you should just move Pants Build Plugin for IntelliJ
 to the top or just remove Editing BUILD Files ;-)"

Reviewed at https://rbcommons.com/s/twitter/r/357/
New twitter/commons version, with fix for _atexit errors.
The massive BUILD file and Target refactor

So much change.  See https://rbcommons.com/s/twitter/r/321/

The highlights:
* Tighten up the BUILD file context
* Remove ParseContext, don't allow recursive BUILD file parsing
* Formalize the BuildGraph data structure
* Formalize and tighten up the Target class
* Linearize the Target class hierachy
* Force explicit registration for client plugins
* Add the Payload class and tighten up invalidation
Have a single internal classes dir even in a non-deployjar bundle.

This restores the status quo ante.

This turns out to make the code a lot simpler too.

The terminology 'deployjar' is confusing, so I changed the name
of the internal method deployjar() to loose_classfiles_jar(), which
is more descriptive. However I left the term 'deployjar' in the
cmd-line flag name, for backwards compatibility.
Fix list-of-sources instead of fileset set operations
Fix setup_py sources use missed in big refactor
Integrate refactor changes into protobuf task
Remove base_test module and fix up missing deps
Merge remote-tracking branch 'origin/master' into travis/thin_idea_projects
Bust up some of the dependency hairball

* Remove some unused imports
* Separate reporting.report
* Move cache_manager and task_error into base/
* All circular dependencies are removed from base/

Testing Done:
ci.sh passes

Reviewed at https://rbcommons.com/s/twitter/r/360/
doc, docstring: Jake Donham's clarification: where to see test output

https://rbcommons.com/s/twitter/r/366/
Fix setup.py install_requires post targets refactor.

With the target refactor PythonRequirementLibrary is now used rather than
PythonRequirement when generating setup.py install_requires. At present this
field is not populated leading to missing requirements and unisntallable
pants-generated sdist's.

Testing Done:
./build-support/bin/ci.sh

Confirmed setup.py install_requires is now populated.

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