Fix bad exception handling in zinc_analysis_cache
Restore python functionality.

Overzealously deleted in previous commit.
Add a timeout to the RESTful artifact cache.

Also fix a couple of nits.
Be more conservative when injecting sibling resource dirs.

Two changes:

1. Prevent multiple bases that are siblings from injecting the
   same 'resources' sibling multiple times.

2. Only inject if the dir exists.

This mitigates a problem that was exposed by a bug in our
BUILD.bootstrap, whereby we hadn't registered scala_tests in
our tests/ source root. In this case the base is set to the
target's parent dir...
Fix forking bug.

The old code caused a race condition in contexts, such as
temporary_dir() etc.
Add source -> target lookup for JVM targets

Also add pretty-print function to Address. These changes support a
build-file generating tool I've written in foursquare.web.
Fix a build invalidator bug.

A target's cache key contains the representation of its jar deps.
However the new Artifact class had no __repr__, so that representation
was Python's default one, which contains the memory address of the
object... Since this is likely to change from run to run, the result
is a ton of spurious invalidation.
Fix dependency analysis.

Deps analysis was sometimes using non-normalizing strings for build target addresses.
Now, all build targets are normalized as Address objects. (Or nearly all - jar
dependencies are treated in non-standard ways in pants, which makes it difficult to
handle them uniformly.)

Unnecessary deps have been cut back so that only unnecessary source dependencies are flagged. (Including jars in the unnecessary-deps list led to large numbers of errors
related to codegen targets overdeclaring jar dependencies. A fix for that is coming
soon.)

This also uncovered a batch of new undeclared dependency errors. I'm still worried
about whether or not these are correct. Spot-checking by hand seems to verify that
they're real, but the shear number is too large to check all of them by hand,
and the size of the list concerns me.

This is definitely a step in the right direction. I'm not quite ready to have this deployed, so please don't merge this into the main branch quite yet. Next change should fix the remaining issues, and hopefully increase my confidence level about it.

Auditors: benjy