Print out the stack trace when we get an InterruptedException in buckd.
Print client disconnection.

Summary:
Print error message on client disconnection. In the normal
case this will never be seen as the client has disconnected, but this
change should help detect suspected false disconnections.

Test Plan: buck test --all
AccumulateClassNamesStep now includes the hashes of the .class files in classes.txt.

Summary:
This is the first step in making it so that
`DexProducedFromJavaLibraryThatContainsClassFiles` does not re-dex if the `.class`
files from its dependent `JavaLibraryRule` are unchanged.

Test Plan: Sandcastle builds.
AccumulateClassNames makes the discovered class names and their hashes available.

Summary:
In turn, this makes the class names and hashes available to
`DexProducedFromJavaLibraryThatContainsClassFiles`, which is important for:
(1) Avoiding a re-dex when the .class files have not changed.
(2) Making it possible for split-dex to determine which intermediate .dex
files need to be in the primary classes.dex.

Test Plan: Sandcastle builds.
Use AccumulateClassNames.getClassNames() to determine whether to run dx.

Summary:
Previously, `DexProducedFromJavaLibraryThatContainsClassFiles` would store a
tiny bit of metadata to determine whether its dependent `AccumulateClassNames`
found any class files. Now we just ask the `AccumulateClassNames` directly.

Test Plan: Sandcastle builds.
Convert DexProducedFromJavaLibraryThatContainsClassFiles into an AbstractCachingBuildRule that is an AbiRule.

Summary:
There are three possible scenarios when building `DexProducedFromJavaLibraryThatContainsClassFiles`:

(1) The are are no `.class` files to dex.
(2) There are `.class` files that need to be dexed to update/create the `.dex.jar` file in `buck-out`.
(3) The existing `.dex.jar` file in `buck-out` already represents the `.class` files to dex.

In order to be able to look at what is in `buck-out` before building (case 3), we either
need to get a rule key match (which works by default in Buck), or leverage the `AbiRule`
logic we already have in place for Java rules. (If we wait until we start building
`DexProducedFromJavaLibraryThatContainsClassFiles`, the `buck-out` directory containing
the old `.dex.jar` may already be deleted.)

Recall that an `AbiRule` can avoid rebuilding if the following conditions hold:
(1) The hash of the current rule definition and its input files matches the
hash on disk (written in `.metadata/METADATA_KEY_FOR_RULE_KEY_WITHOUT_DEPS`).
(2) All relevant deps that have an ABI have the same ABI as the last time the
rule was built (written in `.metadata/ABI_KEY_FOR_DEPS_ON_DISK_METADATA`).

Therefore, for an `AccumulateClassNames`, we assign it an ABI based on the
contents of the `classes.txt` file that it writes.
Because a `DexProducedFromJavaLibraryThatContainsClassFiles` has a
`AccumulateClassNames` as its only dependency, the ABI of `AccumulateClassNames`
is the ABI-key-for-deps of the `DexProducedFromJavaLibraryThatContainsClassFiles`.

Ultimately, this ensures that if a `java_library` rule is recompiled such that its
generated `.class` files are the same (this happens when a `java_library` rule is
recompiled in response to one of its deps changing in a way that does not affect
that `java_library` that depends on it, such as adding a new public method),
then the output of the `classes.txt` file for the `java_library` should be the same.
In turn, because the ABI of the `AccumulateClassNames` that generated the
`classes.txt` is unchanged, the `DexProducedFromJavaLibraryThatContainsClassFiles`
should rightfully avoid a rebuild. This optimization can have a significant impact on
incremental build times.

Test Plan: Sandcastle builds.
Add ability to specify target for project.

Summary: First bit of slices.
Fix WARN_ON_TRANSITIVE.

Summary:
The WARN_ON_TRANSITIVE flag seems to have been broken for a while.

Fix it and add tests.

Test Plan: tests
Use Java 7 APIs to unzip a file instead of shelling out to `unzip`.

Summary:
Users have been reporting intermittent errors when multiple threads
are unzipping artifacts pulled from cache. Previously, we were
shelling out to `unzip` to do this extraction, but now, we use Java 7
APIs that create the parent directories for each file before
writing the file. We'll have to live with this in the wild and see
whether this is an improvement.

If nothing else, this makes this part of the code work on Windows
instead of only Linux and OS X.

Note that this diff also removes the `filesToExtract` option from `UnzipStep`,
as no one was using it and it was not tested.

Test Plan:
I did a build purely from cache with 12 threads and did not get
any collisions.
Replace `createMock(BuildableContext.class)` with `new FakeBuildableContext()`.

Summary: As promised, I am trying to address my abuse of mocks by replacing them with fakes.

Test Plan: Sandcastle builds.
Replace `createMock(JavaLibraryRule.class)` with `new FakeJavaLibraryRule()`.

Summary: As promised, I am trying to address my abuse of mocks by replacing them with fakes.

Test Plan: Sandcastle builds.
Replace `createMock(Buildable.class)` with `new FakeBuildable()`.

Summary: As promised, I am trying to address my abuse of mocks by replacing them with fakes.

Test Plan: Sandcastle builds.
Replace `createMock(OnDiskBuildInfo.class)` with `new FakeOnDiskBuildInfo()`.

Summary: As promised, I am trying to address my abuse of mocks by replacing them with fakes.

Test Plan: Sandcastle builds.
Rearrange steps in AndroidBinary.getBuildSteps() so aapt_package steps come first.

Summary: This sets us up to do the aapt_package stuff in a separate build rule.

Test Plan:
Sandcastle builds.
Build all the things and make sure the APKs still come out right.
Updated args4j lib to 2.0.26 version.

Summary:
Updated to the latest args4j version.
Now arguments in format -argname=argvalue are supported.
Allow project-specific java parameters.

Summary:
We need to increase the heap size for Buck.  This lets projects add
java runtime flags.

Test Plan: unit tests; run a command that OOMs, add .buckjavaargs, verify success
Update IDE configurations in response to reflect recent args4j update.

Summary:

Test Plan:
Loaded project in Eclipse: it works fine.
Add webp to filtered drawable resources.

Summary:
This way webp in drawable per-dpi directories will be filtered too
(and we will be able to use webp for newer phones).
Fix python configuration processing.

Summary:
Previously buck would try to use any executable file or
directory in its working directory as a python interpreter. It would
also silently fall back to finding a python on the PATH if a python
path was specified in the config, but invalid. This change fixes both
of those problems and adds tests.

Test Plan:
0) buck test --all
1) mkdir python
2) touch BUCK
3) check that "buck build :lolwut" returns the error "BUILD FAILED: No rule
found when resolving target //:lolwut in build file //BUCK"
Update bin/buck.cmd which has fallen behind bin/buck_common.

Test Plan: Ran Buck on Windows 7.