Fix red background issue with buck project output.

Summary:
Pretty straightforward. The intellij.py command was run with a console with
ansi enabled, which meant the output was wrapped in bash color codes which
were passed down to the main buck command console's stdout.

Test Plan: run buck project, no more blood bath.
Fixes to `buck quickstart` so the project builds in IntelliJ out of the box.

Summary:
This almost makes thing work, though I am still having a problem with debug.keystore.
I posted a question on StackOverflow, which hopefully one of their devrel people will answer:
http://stackoverflow.com/questions/19326675/how-do-i-fix-or-debug-error-android-packager-app-cannot-create-new-key-or-k

Test Plan: Run `buck quickstart`, import the project into IntelliJ, and try running "Make Project".
Fix https://github.com/facebook/buck/issues/58.

Summary: Make test locale independent.

Test Plan: Change locale to have , as the decimal seperator, verify test passes.
Print command errors to console.stderr instead of to the bare stderr.

Test Plan: buck build buck
`buck query` for paths and deps backed by neo4j.

Summary:
Added a `buck query` command to query for all the dependencies of a target, or for all the
dependency paths from a target back to a source. The syntax is `T -?> S`
where `T` is the target, `?` is the search depth, and `S` is the source. Leaving `S` blank will
query for dependencies rather than paths. `?` can be a number or `*` for unlimited depth, and
an empty `?` defaults to depth `*`.

For example, buck query '//:android-binary ->' searches for all immediate dependencies of
//:android-binary.

Each time the command is run, a neo4j instance is spun up and the dependency graph information
is fed to neo4j. Then we construct a breadth-first traverser to crawl the graph depending
on the query. Adding more sophisticated queries should be straightforward given the neo4j
traversal API.

Test Plan:
Run the unit tests in `ant test`, which includes a new QueryCommandTest to test the new command.
Declare param as Collection<Path> instead of Iterable<Path>.

Summary:
It turns out that `Path` implements `Iterable<Path>`. Therefore, to prevent
against a method accepting a single `Path` when you want a collection of
`Path`s that implements `Iterable<Path>`, we declare the type of the
constructor param to `ClasspathTraversal` `Collection<Path>` instead of
`Iterable<Path>`.

Test Plan: Sandcastle builds.
Close a ZipFile that was not getting closed.

Test Plan: Sandcastle builds.
Fix connecting to Cassandra to still connect in parallel with parsing.
Introduce BlockingHttpEndpoint.
Imported unit tests for ManifestMerger from AOSP.

Summary:
Since ManifestMerger already has unit tests in AOSP for most of its functionality we'll
just import them. We'll extend these unit tests to test new functionality that
we add in a followup diff.

Test Plan: Run unit tests.
Remove unnecessary check to strip trailing '/' from native library path.

Summary:
Verified that the check is not needed by changing the if block to:

  if (!nativeLibDir.endsWith("/")) {
    nativeLibDir = nativeLibDir + "/";
  }
Fixed manifest merging when activity-alias are used.

Summary:
If `activity-alias` is used in application's AndroidManifest.xml and
activity mentioned in 'android:targetActivity' comes from library
manifest, application will fail to install.

The reason for this is that `activity-alias` requires target activity
to be declared before `activity-alias` element. Since we always merge
stuff from libraries at the end we always would get activity
from library be after `activity-alias` in the app.

This diff fixes this issues by introducing "normalization" step
after all libraries' elements were merged into main manifest. This
step simply moves all `activity-alias` elements to the very end
of `application` element.

This is fine since none of the other elements in manifest are order
sensitive.
Added support for merging <meta-data> elements from <application> in AndroidManifest.

Summary:
ManifestMerger didn't merge <meta-data> elements that were direct children
of <application>. This diff adds support for this scenario.

Test Plan: Unit tests.
Merge string resources for region specific locales.

Summary:
Merge region specific locale resources with the corresponding base locale resources.
For example, if there are separate string resources in an android project for locale
"es" and "es_US", when an application running on a device with locale set to "Spanish
(United States)" requests for a string, the Android runtime first looks for the string
in "es_US" set of resources, and if not found, returns the resource from the "es" set.
We merge these because we want the individual string json files to be self contained
for simplicity.
Cache InputFile content hashes.

Summary:
When run as buckd a cache of the hashes of InputFile contents
is maintained, avoiding the need to read and hash a potentially large
number of files each build to determine whether they have
changed. Hashes are invalidated when the corresponding file is changed
and buckd is notified via the file system watcher.

Test Plan:
1) buck test --all
2) buckd
3) buck build buck
4) buck build buck
5) check that the durations of the parse and build phases are both < 0.1 second
Interrupt command processing on client disconnect.

Summary:
Updates the version of Nailgun used by Buck to a fork which adds support for
detecting client disconnection and adds a callback to Main which interrupts
command processing on client disconnection, so that Buck behaves consistently
when killed wether using buckd or running standalone.

Test Plan: buck test --all
Added Intellij files for neo4j jars.

Summary:
IntelliJ needs to know about neo4j jars to be able to build and run the tests.
Addeed them to the .iml and to the .idea/libraries directory.

Test Plan: Run all tests in Intellij.
Invert a test to reduce indent.

Summary:
I'm going to make this method more complicated, so preemptively reducing
the indent.

Test Plan: Unit tests.
Make MoreFutures.isSuccess not throw when it is interrupted.

Summary:
It's possible for a future (like Guava's AbstractFuture) to return true
from isDone but still throw an InterruptedException from get() if the
current thread has been interrupted.  The old code threw a
RuntimeException in this case, which was unnecessary.  Change it to just
retry and reset the thread interrupt status instead.

This solution was informed by the "Noncancelable tasks" section of
http://www.ibm.com/developerworks/java/library/j-jtp05236/index.html

Test Plan:
Unit tests.  The new test failed 5 out of 5 times on the old code on my
machine, but it could pass spuriously (without the doNotOptimizeMe loop,
it was passing about 50% of the time).  With the new code, it should
pass deterministically.
Add remote branch to .buckversion.

Summary:
Allow us to specify a buckversion with a remote branch.