Run buckd by default if $USE_BUCKD is defined.

Test Plan:
buck build buck
yolo4
Ensure changes to resources cause java_library targets to be repacked.

Summary:
Buck should repackage java_library targets if their resources change, even if that resource
has an ABI that itself hasn't changed.

Test Plan: buck test --all
Expose hashes of .class files that end up in a DexWithClasses.

Summary:
PreDexedFilesSorter uses this to create a map of dex input paths to their hash,
just like HashInputJarsToDexStep. Everything will slowly come together perfectly :)

Test Plan:
build messenger.
Add a call to `getDexInputsHashes()` before returning PreDexedFilesSorter.Result,
attach debugger and verify hashes are getting calculated.
SmartDexingStep no longer relies on the crc of zip entries to hash input jars.

Summary:
The hashes of inputs to be dexed are passed from above into SmartDexingStep,
which it uses to decide whether a dex needs to be recreated. Since earlier, it
was using the zip entry crc for this, it also used to check for timestamps on
the hash output files (arghhh) which basically meant smart dexing never worked
on the first run post pulling-everything-from-cache. Now everything is awesome!

Test Plan:
buck build fb4a, messenger
change a java file, build again, verify only one of the dex files is recreated.
unit tests.
macosx_binary copy frameworks into .app/Frameworks

Summary: These frameworks were actually being copied into the Products/ folder, not Products/App.app/Content/Frameworks/

Test Plan: Update unit test, pass. Build Diamond editor, move to temp folder, execute. It doesn't crash now.
Update build-tools version for Travis

Summary:
We hit an issue in Travis where the version of dx from built-tools-v18 doesn't
like our java7 class files.  https://travis-ci.org/facebook/buck/builds/23236332
Update to build-tools-v19.0.3 to fix it.

Test Plan:
Ran the travis test script locally and saw these failures go away. There was
one other seemingly unrelated failure, but it could be a flaky test, not sure
yet.
Make BuildThenTestIntegrationTest less flaky.

Summary:
This test specified an exact number of output lines, so it would fail
whenever anything unexpected made it to stderr. Make it look only at the subset
of lines it really needs to check.

Test Plan: Change the expected output and confirm that the test fails.
[buck-ios] include headers in ios_test targets

Summary:
Buck is currently not include headers referenced by srcs in
ios_test rules, which causes problems for test targets that share helper
headers between files (such as FBComposerKit). This fixes that with a
similar fix to @jprado's fix for this for the ios_binary rule in
D1265561.

Test Plan:
built buck, regenerated composer kit xcodeproj, confirmed
headers were now included in test target + it built successfully.
@build-break: Fix ProjectGeneratorTest

Test Plan: run tests
[buck] remove unused private method

Summary: Now unused after D1285855.

Test Plan: buildbot
[ios] Add asset catalog compilation scripts

Summary:
These scripts are used in a custom build phase to compile asset catalogs to the
appropriate target output format.  They are necessary because they differ in
behavior from the default settings for actool when asset catalogs are part of
the resources build phase.

When a target's deployment target is iOS 6 and below, the scripts produce a
hierarchical format (whereas actool places all assets in the root
directory). This makes it difficult to migrate bundles to asset catalogs.

For iOS7 and above, asset catalogs are compiled normally, flattening the
namespace into Assets.car.

This script also transforms actool warnings into errors. Specifically, this
prevents assets with duplicate names resulting in silent problems.

Test Plan: Run ant test.
[ios] Add asset catalog rule and project generation logic

Summary:
This change allows buck to generate Xcode projects that can compile asset
catalogs (supported by Xcode 5+).

Test Plan:
Edit an iOS library project to include an apple_asset_library rule, upon which
the ios_library rule depends. Run buck project and inspect generated
project. Build test target in the project to ensure that asset catalog is
compiled correctly.
Add JavaFileParser, using the Eclipse ASTParser.

Summary:
The autodeps feature needs to be able to parse Java files. Previously we tried
to use the builtin parser in tools.jar, but that got us into a dependency
tangle that probably would've broken on some version of the JDK. It's cleaner
to just check in a parser, and Eclipse's seems like a good candidate.

Test Plan: New unit test included.
Use IOS_BINARY for ios binary rule

Test Plan: Updated test
Fix stlye of TestSelector

Summary: Findbugs was sniffing around these files as being code smelly :)

Test Plan: Unit tests
Revert build_config generator.

Summary: Reverts 91ea52689fb0c53025d847713bc090e161ef9704 to fix attribution.

Test Plan: buck test --all
Implement a build_config generator from https://github.com/facebook/buck/pull/95

Summary:
Simplified the build steps a bit.
Use ProjectFilesystem in GenerateBuildConfigStep, and try-with-resources.
Use System.lineSeparator() for platform independent newlines.
Make field final.
Cleaned up unnecessary getter methods.
Simplified creating buildable/build rule in the unit test.
Fixed styling.

I will follow up with another diff that updates the soy docs.

Test Plan: buck test --all
Helper method to enable `dir` cache in an integration test.

Test Plan: buck test --all
Changing an asset file under an android_resource() rule that does not include any resources should get repackaged.

Summary:
This also explains the issue raised on github:
https://github.com/facebook/buck/issues/100

UberRDotJavaUtil ignores any resources with empty `res` dir argument. Since the
deps of `AaptPackageResources` did not include asset only resources, when an asset
file changed under such rules, we wouldn't run aapt to package resources into the
resulting .ap_.

Test Plan:
Added an integration test which would fail before this fix.

buck test --all
[ios] Fix typo in asset catalog compilation script

Summary:
Made a typo in one of the top level methods of the asset catalog compilation
script.

Test Plan:
Use the script as part of a build phase in a sample Xcode project. No longer see
warnings from actool.