Support multiple traces in Buck HTTP server

Summary:
We're now logging Chrome traces from Python as well as Java.
Now that the build IDs line up, we can have Buck's HTTP server
load all the traces and display them in Chrome.

This diff is part 1 of 2 diffs. It adds the plumbing to support
loading multiple traces; I'll update `TracesHelper` to load multiple
traces in the next diff.

Test Plan:
  ant test -Dtest.class=TraceHandlerDelegateTest
  buck project

load trace in browser, confirm it loaded with no JS errors
Simplify TraceDataHandlerTest

Summary:
I'm modifying TracesHelper and found TraceDataHandlerTest's use of
mocks to make the test very fragile.

This change simply mocks out TracesHelper instead of mocking all of
its dependencies.

Test Plan:
ant java-test -Dtest.class=TraceDataHandlerTest
Easy: Remove Guava logspew workaround

Summary:
In a previous diff, I disabled guava's future logging, because
it always spewed whenever we had a build failure.

Guava 17 fixes the bug, and we now use it in Buck, so I can remove
the hack to disable guava's future logging.

Test Plan:
ant clean default; added syntax error to a .java file;
buck build; confirmed no more logspew.
Use Path instead of File and simplify tests in TracesHelper

Summary:
I'm getting ready to make Buck's HTTP server combine
traces. When doing so, I found `TracesHelper` hadn't been converted
from `File` to `Path`, and its tests were fairly complicated.

This converts `TracesHelper` and `TracesHandlerDelegate` from
`File` to `Path` and simplifies the tests.

Test Plan: ant java-test
Add support to /trace/[build-id] to show both Python and Java Chrome traces

Summary:
Does what it says on the tin.

Test Plan:
Added a few more unit tests. Ran `ant clean default java-test`.
Ran `buck project`. Went to http://localhost:8081/traces/ and saw trace
appear. Clicked on it, confirmed I got traces from both Python and Java.
Pass class preprocessor dir as an absolute file

Summary:
Running this in-process in integration tests was failing without this.
I don't know if this is the cleanest fix.

Test Plan: Upcoming integration test uses it.
Remove unused case in BuildTargetTypeCoercer

Summary: I couldn't see any place where this branch was taken.

Test Plan: Buildbot
Invert instanceof condition in BuildTargetTypeCoercer

Summary:
This was just IntelliJ's "invert condition", followed by removing an
unnecessary "else".  Putting the exceptional case at the top makes it
possible to eliminate a level of indent from the main body.

Test Plan: Buildbot.
Add a heuristic for SourcePathTypeCoercer

Summary:
Previously, we attempted to parse *all* source paths as build targets
first, then only regarded them as files if that threw an exception.
This resulted in lots of exceptions during action graph creation,
because most of our source paths are files.  Creating those exceptions
is slow.  This brough action graph creation time for FB4A down by about
20%.

Test Plan: CI
Optimize BuildTargetParser string formatting

Summary:
String.format showed up in a profile of action graph creation.  Using a
properly-sized StringBuilder results in a marginal perf boost.

Test Plan: CI
Use nailgun server with a bunch of logging.

Test Plan: buck test --all
Make C/C++ support work with darwin's linker

Summary:
MacOS uses the darwin linker, which uses a completely different
set of flags than the GNU linker.  This diff tries to make the linker
flag code more portable by wrapping platform specific details into
a per-linker wrapper class, which get instantiated and returned by
the ##CxxPlatform## class.

Test Plan: buck test --all
Automatically build shared libs for prebuilt C/C++ libraries

Summary:
It's not uncommon for users to only add PIC-enabled static libs
when adding a prebuilt C/C++ library.  Since we require shared libs
for use with python and eventually android, automatically generate
the shared lib from the static lib if none is provided.

Test Plan: added test
Don't bother sorting events by timestamp in ChromeTraceBuildListener

Summary:
This is unnecessary according to the docs as long as the trace events
for a given TID are in increasing order (which they are, since we use a
synchronous event bus):

https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/edit

  The timestamps for the duration events must be in increasing order
  for a given thread. Timestamps in different threads do not have to be
  in increasing order, just the timestamps within a given thread.

Test Plan: ant clean default; buck project; view trace in http://localhost:8081/traces/
Set process name in Chrome trace output

Summary:
Does what it says on the tin. Now we get 'buck' and 'buck.py'
in the Chrome trace viewer in addition to PIDs:

Test Plan:
ant clean default; buck project; open http://localhost:8081/traces,
confirm process names showed for both buck and buck.py
Make ProjectFilesystem.getDirectoryContents() / listFiles() throw IOException on error

Summary:
These methods are currently marked `@Nullable` to indicate error, which I think
is more annoying than just allowing them to throw `IOException`.

So, now they throw `IOException`. This diff bubbles up the exceptions where possible
and converts them to `RuntimeException` where they're used inside `Comparator`
etc.

Test Plan: buck test
C++ platform: Lookup lex flags in buck config correctly

Test Plan: added unittest
Allow source jar for android library rules.

Summary: Similar to java_library rule.

Test Plan:
buck build <android_library_target>#src
manually verify that the generated zip contains source files.
Alphabetize KnownBuildRuleTypes.

Test Plan: Visually scanning the list. This is harder than you think.
Make AppleLibrary#archiver a private final field.

Test Plan: No complaints from Eclipse.