Unify 'srcs' and 'headers' in Apple BUCK files

Summary:
Yiding and I realized the 'srcs' and 'headers' entries in
BUCK files don't need to be separate.

This diff unifies the two. Now, we just have one 'getSrcs()' method
which returns the tree of sources and headers.

At project generation time, we differentiate between headers and
sources by the file extension.

Test Plan: Unit tests still pass.
reduce the scope of GCC_PREFIX_HEADER override hack

Summary:
when generating separated projects, configs are injected into the target inline
level, hence this flag may override existing settings.

This diff reduces the scope to only work when REFERENCE_EXISTING_XCCONFIGS is
off (i.e. only combined mode), along with a comment explaining the hack itself.

Test Plan:
unit test

generate a project from buck rule with GCC_PREFIX_HEADERS set in target inline
level, see that it's not overriden.
Helper method to touch files in FakeProjectFilesystem.

Test Plan: unit test
Pass absolute path to the --output option of dx command.

Summary: And fix the unit test.

Test Plan: unit test
Access files via ProjectFilesystem in ClasspathTraversal.

Summary:
`Path.toFile()` as used currently does not work in integration tests where the
working directory is not the same as the ProjectFilesystem root dir.

Test Plan: unit tests pass
Encapsulate javac path, version and command line options into one class.

Test Plan: sandcastle
Add always_exclude flag to allow exclude to win for script generated commang line arguments.

Test Plan: Unit Tests
Access files via ProjectFilesystem in ZipDirectory Step.

Summary:
One of the integration tests was failing in an upcoming diff because of the
use of `File.toPath()` which doesn't work when the current directory is not the
same as the project root.

Similar to D1194749 (53658128db2ba453d079108792c2c86fb5c90d1a)

Test Plan: unit tests pass
[clang] add library support for reading and writing header maps

Summary:
[clang] add library support for reading and writing header maps

We can now read and write clang header maps from Buck!
  http://clang.llvm.org/doxygen/HeaderMap_8h_source.html

The unit test includes reading a real hmap file generated by Xcode.

Test Plan: buck test test/com/facebook/buck/apple/clang:headermap
Support scenario-driven primary dex packing (part 4)

Summary:
This enables properties in android_binary() to allow specifying a list
of classes generated based on some scenario, such that those classes
and their first-order dependencies are included in the primary dex.

This is part of a series of changes to support scenario-guided
optimization of which classes to include in the primary dex.

Test Plan:
existing unit tests, build fb4a and messenger with startup classes list

Step through new code in debugger while building fb4a.
Use the optional custom javac if present to compile R.java files [part 1/2]

Summary:
Now that we allow using custom javac, we should use that everywhere in the code
base to compile any java code. This makes it so for the dummy R.java files that
are created per android library module.

The next part will do the same for the uber R.java files, which means
`AndroidBinaryRule` (which creates `UberRDotJava`) needs to be passed the path
to the custom javac.

Test Plan: sandcastle
Basic support for walkRelativeFileTree() in FakeProjectFilesystem.

Summary: I will keep adding more features as we need them for unit tests.

Test Plan: unit test
Eliminate the last android dependency from buck/java

Summary:
Not the cleanest solution, but works fine. Cannot be injected into the
test rule because you can only access the android target platform at the time
of execution through ExecutionContext.

Test Plan: unit tests pass
Check both the build rule and its buildable for `AbiRule`.

Summary:
Currently, new buildables that want to take advantage of the AbiRule optimization
in `AbstractCachingBuildRule` have to define a new `BuildRule` which implements
`AbiRule`. Given our plans to merge `BuildRule` and `Buildable`, it makes sense
to make the behaviour similar to `InitializableFromDisk`.

Test Plan: Updated
Use ProjectFilesytem.walkFileTree instead of DirectoryTraverser in AaptPackageResources.

Summary:
Less code. Avoids dealing with `File`<-->`Path`<-->`String` conversions.

Also easier to maintain test code.

Test Plan:
unit tests pass.

buck build instagram and verify that assets are included in the APK.
emit list of generated projects when generated separated projects

Summary:
Modified `SeparatedProjectGenerator#generateProjects` to return a list of
projects.

Modified `ProjectCommand` to print it out.

Test Plan:
Added a unit test to test the correct list is returned.

Manually tested wth `buck project` to see that ProjectCommand emits the file
name. ProjectCommand itself doesn't seem very amenable to unit testing.
Use the optional custom javac if present to compile R.java files [part 2/2]

Summary:
Depends on D1185232

Pass the optional path to custom javac to android binary rule builder, so that
the graph enhancer can pass it along to `UberRDotJava` which uses it to create
the javac step for compiling the R.java files.

Test Plan: sandcastle
Get rid of the android:r build rule now that buck/java no longer depends on android.

Test Plan: sandcastle
Add a helper method to run `buck build <target>` in integration tests

Test Plan: Converted a call site. Sandcastle.
Close zip file in ApkInspector.

Test Plan: sandcastle