Migrate one test from the root testdata directory into its proper place.

Summary:
This moves `testdata/javatestrule` to
`test/com/facebook/buck/java/testdata/java_test_get_class_names`.
The root `testdata` directory is a historical artifact for integration
testing that predates `ProjectWorkspace`.

Because only some of the tests in `JavaTestRuleTest.java` need
`ProjectWorkspace`/`DebuggableTemporaryFolder`, I split out the
ones that needed it into a separate test,
`JavaTestGetClassNamesIntegrationTest.java`. This makes it easier
to apply a common `setUp()` method to all of the tests that
actually touch the filesystem.

Test Plan: Sandcastle.
Add new events for buck.py parsing time, print to SuperConsole

Summary:
In some repos, running buck.py takes about 15-30 seconds when
the cache is cold. People have complained that they're confused that
buck prints no output in this case.

This diff adds new paired events (`ProjectBuildFileParseEvents.Started` /
`ProjectBuildFileParseEvents.Finished`), posts them to `BuckEventBus` before
and after running buck.py, and updates SuperConsole to display those
events as:

  [+] PARSING BUCK FILES... 0.2

Once parsing completes, this changes to:

  [+] PROCESSING BUCK FILES... 0.2

(This previously said "BUILD" files, but I'm guessing that
was a holdover from an earlier related system.)

Test Plan:
Unit tests included. Ran 'buck project' in repo where
buck.py took a long time. Confirmed output was as expected.
Allow BuildTargets to have multiple Flavors.

Summary:
We need to be able to specify many different dimensions on the same target in
several occasions (eg: "debug, x86"). Amend BuildTarget to support that.

Test Plan: buck test --all
Treat empty files as non-existing in the launcher scripts.

Summary: I thought this was better than modifying all the call sites to do this check.

Test Plan:
```
$ buckd
$ echo "" > .buckd/buckd.runcount
$ buck
```
[buck] fix audit owner

Summary:
the command currently fails with a runtime exception when there's no
BUCK file in a parent directory. Add the file to the set of files with no owners
instead.

Test Plan:
##buck audit owner .buckconfig##
##buck test --all##
Don't use %d for secondary dex names

Summary: Apparently these can be localized.

Test Plan: Integration tests.
Include split-dex metadata in raw multidex builds
Fixing some annotation inconsistencies in the package com.facebook.buck.apple.xcode.xcodeproj

Summary: Fixing some annotation inconsistencies

Test Plan: buck test --all
Make the JUnitRunner check for JUnit and Hamcrest.

Summary:
The JUnitRunner requires both JUnit and Hamcrest in order to run. However, there is
no guarantee that the tests being run include those in their classpath. Without them
being present, the runner chokes with cryptic error messages. Those messages should
be a little less cryptic, so we output a warning to syserr.

Test Plan: buck test --all
Ensure schemes do not include each others' tests

Summary:
This diff ensures that we only pass in to SchemeGenerator the
test-building and test-running rules for rules included in
the recursive dependencies of the main rule in the scheme.

I added a new integration test
`ProjectIntegrationTest.testBuckProjectGeneratedSchemesDoNotIncludeOtherTests`
which includes two schemes with overlapping but disjoint sets of tests.

Part of this fix slightly adjusted the order in which we run tests (we run
dependencies before the main rule now), so I had to tweak one of the
other tests.

Test Plan: Integration test included.
Allow AppleNativeTargetDescriptionArg's configs to use SourcePath.

Summary:
AppleNativeTargetDescriptionArg currently allows only paths as
references to xcconfigs. This adds support for sourcepath references to
them.

Test Plan: CI, generate an Xcode project with sourcepath xcconfig references
Fix BUCK file for the thrift tests.

Test Plan: buck test test/com/facebook/buck/thrift
New Python function timing.monotonic_time_nanos()

Summary:
I'm planning on extending the Chrome tracing subsystem out to
the Python launcher, so we can include timing for things like launching
watchmand and buckd itself.

To do this, we need two things:

1) A monotonically-increasing timestamp to write events from Python, and
2) A consistent timestamp epoch between Python and Java

This diff gives us 1) by adding a cross-platform function to get a
monotonically-increasing time value in nanoseconds. I implemented
it for Linux, OS X (Darwin), and Windows.

Test Plan:
import timing; print timing.monotonic_time_nanos() on
OS X 10.9.4 and Linux 3.2.51 (CentOS 6.3).
Pass Python launcher nanos epoch to buckd and use when logging events

Summary:
I'm planning on extending the Chrome tracing subsystem out to
the Python launcher, so we can include timing for things like launching
watchmand and buckd itself.

To do this, we need two things:

1) A monotonically-increasing timestamp to write events from Python, and
2) A consistent timestamp epoch between Python and Java

This diff gives us 2) by passing in a new epoch for nanos from Python
to Java when launching `buckd`. When present, we use a new clock
(`com.facebook.buck.timing.NanosAdjustedClock`) in `buckd` which uses the
provided epoch for nanos instead of the default `System.nanoTime()` epoch.

We can get away with this because `System.nanoTime()`'s epoch is undefined,
so we're free to define our own as long as we're consistent about it.

Test Plan:
Edited .bucklogging.local.properties and added
com.facebook.buck.cli.level = FINEST. Ran 'buck project' in buck repo.
Confirmed in logs that new epoch was used. Opened Chrome trace generated
by 'buck project' run in chrome://tracing , confirmed it worked.
Add Chrome tracing to buck launcher

Summary:
This extends Chrome tracing out into the Python buck launcher.
To use the tracer, just write:

  from tracing import Tracing

  with Tracing('eventname'):
    pass

Then, at the end of your run:

  Tracing.write_to_dir(buck_log_dir)

We currently write to buck-out/log/traces/launch.[uuid].trace and make
a symlink from launch.trace to that file.

Test Plan:
Added tracing to buck's main() method, ran 'buck project',
confirmed trace was written to buck-out/log/traces/launch.[uuid].trace
and symlink existed. Opened in chrome://tracing in Chrome, confirmed
timestamps made sense and matched build.trace.
Add missing @Nullable annotation to NoAndroidSdkException.java

Summary: Adding @Nullable annotation as well as the needed change to a BUCK file to support the import of javax.annotation.Nullable;

Test Plan: buck test --all
Make AppleNativeTargetDescriptionArg's arguments optional.

Summary:
This changes AppleNativeTargetDescriptionArg to have only
optional arguments. We can have sensible defaults, and we need them
to properly implement resource bundles as it would be impractical to
require resource bundles' binary rules to specify all the arguments,
but they could still specify them.

Test Plan: CI
Add support for genrule output name in Xcode project generation.

Summary:
This adds very rudimentary support to output files from
genrules added as Xcode project run script phase. Note this will
not play nicely together with genrules meant to be run by Buck
directly.

Test Plan:
generated an Xcode project that contains target that
depends on a genrule with its output name set.
Include current date and time in Chrome trace filename

Summary: Does what it says on the tin.

Test Plan:
Unit test included. Ran 'buck project', confirmed trace file
had expected format.
Move name out of XcodeRuleConfiguration.

Summary:
XcodeRuleConfiguration currently has a name, since configurations have
names in Xcode. However, the value of a configuration has no name, as it's a
map of build settings. This changes XcodeRuleConfiguration, removing the name
so that a coercer for this kind of value can be added.

Test Plan: CI