Labels on pants targets.

This allows 3rd party custom targets to be treated
uniformly with standard targets for things like being
considered 'is_scala' or 'is_codegen' etc.
Fix bug in ScalaCompile.

Previously it would fail to distinguish between scala codegen
targets and targets with actual scala sources.

Also renamed a method on JavaCompile to avoid such confusion
in the future.
Merge pull request #63 from benjyw/master

Fix bug in ScalaCompile.
Merge pull request #62 from benjyw/labels2

Labels on pants targets.
Build cache refactoring.

+ Separates out the different pieces of functionality:
    1. cache key generation.
    2. target invalidation.
    3. artifact caching.

+ Fixes several invalidation bugs:
    1. Java targets will invalidate their Scala dependents.
    2. Invalidation in non-flat mode will work properly.

 + Adds a lot of comments to the tricky bits.

 + Standardizes on the terminology 'invalidated' instead of 'changed'.
   This is more accurate, since in some cases we must rebuild targets
   even if none of their sources have changed.

 + Introduces artifact cache usage for scala. Still experimental though.

 + Introduces the notion of a 'product type' (e.g., 'classes') for a
   task. A task produces just one type of product.
Merge pull request #64 from benjyw/build_cache_refactor4

Build cache refactoring (clean version)
No need to copy classfiles around in ScalaCompile.

The genfile mechanism already handles multiple output dirs perfectly fine.
So all this does is handle the classpath correctly. That copying can add
minutes to a large build, and again when cleaning the extra files.

Also fixes a tiny nit in jar_create, for consistency with subsequent lines.
Pants bugfix.
Get rid of a bad ivy repo reference.
Merge pull request #67 from benjyw/master

Pants bugfix 
Merge pull request #65 from benjyw/no_classfile_copying

No need to copy classfiles around in ScalaCompile.
Adding the ability to override the HttpServerDispatch
Addressing @jsirois' concerns in the pull request
Reformatting
Merge pull request #68 from florianleibert/master

Pulling out the interface for HttpServerDispatch
Make test discovery errors fatal.

Otherwise test may silently-ish not run.
Merge pull request #69 from benjyw/master

Make test discovery errors fatal.
Bugfix in IvyResolve.

Consider a set of targets A, a superset A', and some other set B.

Building A' resolves for A', and then building B resolves for B. If you
then try to run something from A, nothing in it is invalid, and previously
this meant that we wouldn't re-resolve, and instead try to symlink to the
classpath file from a previous compile of A. Except that there isn't one,
so the classpath would remain that of B, and the run would file with
ClassNotFound errors.
Merge pull request #70 from benjyw/master

Bugfix in IvyResolve.
Reworking pants invalidation.

This simplifies the code by having all invalidation done by the
same mechanism, namely changes to the cache_key. For example,
to invalidate dependents we used to manually go through a target's
dependents and invalidate them by force. Now we just add in
each target's dependencies when we compute its cache keys.

This ends up unifying a bunch of special cases, thus making the
code more succinct. It's also more correct wrt artifact caching:

Now two artifacts build with the same sources but different upstream
deps will have different cache keys, as they should.