Refactor a reusable sorting method out of DirArtifactCache.

Test Plan: Sandcastle builds.
Add static files for the embedded Chrome Trace viewer.

Summary:
These resources were generated from https://code.google.com/p/trace-viewer/
using the following bug fix: https://code.google.com/p/trace-viewer/issues/detail?id=478.

Test Plan:
Used with an upcoming diff that serves traces via Jetty.
Introducing these files in their own diff so the subsequent diff is easier to review.
Serve build traces via HTTP when running buckd.

Summary:
`buckd` is already running a web server for the experimental Buck IntelliJ plugin.

This piggybacks off of that work by adding a few servlets to that web server needed
to serve Chrome traces:

* A `ResourceHandler` to serve the static `trace_viewer.css` and `trace_viewer.js` files
 that contain the UI for the embedded Chrome Trace viewer. These resources were
 generated from https://code.google.com/p/trace-viewer/ using the following bug fix:
 https://code.google.com/p/trace-viewer/issues/detail?id=478.
* A `TraceDataHandler` that acts as a JSONP endpoint to serve data from the user's
 `buck-out/log/traces/` directory. It handles URLs of the form
 `http://localhost:9011/tracedata/2cS9z5Ie?callback=onTraceLoaded`,
 wrapping the JSON from `buck-out/log/traces/build.2cS9z5Ie.trace` in
 a call to `onTraceLoaded()` (as you would expect from a JSONP endpoint).
* A `TraceHandler` that loads the Chrome Trace viewer with data by generating an
 HTML page with `<script>` tags that load data from the other two handlers.

Now, if `buckd` is running and a port has been specified in `.buckconfig`, a URL like the
following will be printed to the console: `http://localhost:9011/trace/{id}`. Opening this
link in Google Chrome will display the trace for the build that just finished.

Test Plan:
Add the following to `.buckconfig.local`:

```
[httpserver]
    port = 9011
```

Then run `buckd && buck --version` to ensure `buckd` is up and running.

Then visit `http://localhost:9011/trace/{id}` where `{id}` is the
id of a trace in your `buck-out/log/traces` directory.
Fix Eclipse warnings under src/.

Test Plan: src/ directory in Eclipse is warning free.
Rebuild BuildFileTree once per build.

Summary:
Constructing a BuildFileTree is an expensive operation on
Linux. When switching branches many BUCK files are added and deleted,
causing many identical BuildFileTrees to be constructed for each BUCK
file. This change ensures that BuildFileTrees are only constructed
once per build to avoid this overhead.

Test Plan: buck test --all
Add unit test for `DirtyPrintStreamDecorator`.

Summary:
This fixes `DirtyPrintStreamDecorator` so that:
(1) It uses delegation instead of inheritance.
(2) For methods that return a `PrintStream`, it returns the
    `DirtyPrintStreamDecorator` instead of the delegate.

Test Plan: DirtyPrintStreamDecoratorTest.
Add more cases to EscaperTest.

Summary:
There was a lot of untested code in Escape.java: now it's tested.
No issues were discoverd.

Test Plan: EscaperTest
Add more test coverage for MutableDirectedGraph.

Test Plan: MutableDirectedGraphTest
Remove some unused methods from DefaultImmutableDirectedAcyclicGraph.

Test Plan: Sandcastle builds.
Remove some unused code from BuildRuleFactoryParams.

Test Plan: Sandcastle builds.
Replace `String... args` with `List<String>` as args4j supports `Collection<String>`.

Summary: Lists are much more pleasant to work with than arrays in Java.

Test Plan: Sandcastle builds.
Include args in CommandEvent.

Summary:
This will make it easier to include the args used by the
Buck command in the trace.

Test Plan: Sandcastle builds.
Include args to Buck command in Chrome Trace.

Summary:
This will be helpful when displaying trace information in
the local web server.

Test Plan: Updated ChromeTraceBuildListenerTest.
Upload build results asynchronously from buckd.

Summary:
Call NGContext.exit() as soon as possible after the buck exit
code has been determined and upload results in the background
after the client has exited. Ensuring that the SuperConsole renders
its final frame is fiddly in this case: the Console must be created
before the BuildEventBus in the try-with-resoures block so that the
BuildEventBus is closed first and so delivers the final event to the
console before the console is closed. The console close method must
also synchronously call render to output the final frame to the
NGContext error stream before the exitcode is sent to the nailgun client.
Introduce an ignored failing test demonstrating a problem with SourcePath deps.

Summary:
It should be possible for a DescribedRule to depend on another target simply
by including a SourcePath as one of the parameters of the constructor arg.
This test case demonstrates that this isn't currently the case.

Test Plan: None. There are no logical changes, and the only test case is ignored.
Fix the recently introduced failing test for sourcepath dependencies in DescribedRules.

Summary:
Scan the dependencies of a DescribedRule to try and locate all BuildTargets that it
depends on.

Test Plan: buck test --all
Unit test for DexWithClasses.

Test Plan: Sandcastle builds.
Clean up the sh_binary script and symlink the scriptToRun.

Summary:
Previously we were running scriptToRun out of the main repo, and
scripts could (and did!) read `dirname $0` to access files in the repo without
declaring them as dependencies. To prevent this, symlink scriptToRun into our
temp dir and execute it from there. Also, make the generated script iterate
over an array of paths instead of duplicating a lot of text, to make the whole
thing more readable.
Added a unit test for Dot.

Test Plan: DotTest
Invoke bash explicitly in sh_binary.

Summary:
Previously we were putting "/bin/sh" in the shebang of our sh_binaries. Now,
the generated script depends on bash features. On systems that
don't link /bin/sh to /bin/bash (namely Ubuntu), this causes failures. Fix by
explicitly calling for bash.