handle resources in the root folder
Merge branch 'master' of github.com:facebook/buck

Conflicts:
	src/com/facebook/buck/java/DefaultJavaLibraryRule.java
	test/com/facebook/buck/java/DefaultJavaLibraryRuleTest.java
Merge branch 'master' of github.com:facebook/buck
support for running junit tests from the root directory of the module instead of the project root
ensure resources with no package get put in the right location
Merge branch 'issues/resources-in-root-dir' of github.com:mread/buck
Merge pull request #1 from mread/issues/resources-in-root-dir

ensure resources with no package get put in the right location
Merge branch 'master' of github.com:mread/buck
Merge branch 'issues/jar-files-with-directory-entries'
Merge branch 'issues/jar-files-with-directory-entries'
Add ios_test to xcode project generation.

Summary: And refactor unit tests a bit.

Test Plan: Add additional unit tests.
Project generation support of `IOSBinaryRule`.

Summary: This adds IOSBinary rule support to the xcode project generator.
Add dx code from KitKat.

Summary:
This is an export of the dx directory from the dalvik repository from
0f45d4c669a4b771ecbf2dcb533394ed62ec8cd7, which is just what
origin/master is at today.

This is not MOE-protected because we are going to be including our
changes in the Open Source Buck release.

Test Plan:
Buildbot.
Verified that the git tree has the same hash.
Add dex code from KitKat.

Summary:
This is an export of the dex directory from the libcore repository from
a6d2e94e518857b84ae2230a0f053eac77bae216, which is just what
origin/master is at today.

Test Plan:
Buildbot.
Verified that the git tree has the same hash.
Allow DexMerger to merge multiple dex files at a time.

Summary:
Previously, this class could only merge 2 dex files, which led to N^2
runtime when merging lots of dex files.  This version is about 10x
faster for my test case (about 100 dex files).

Most of the changes were just replacing "dexA", "dexB", and related
objects with lists and maps.  The only complicated part was the
hand-implemented 2-way merge algorithm, which I replaced with Guava's
Iterators.mergeSorted (which required implementing a proper iterator for
the section).

Note that I overwrite the uValue variable on a match because the old
code prefers writing the second value.  This should not matter since
they are presumably equal, but I figured I might as well preserve the
behavior.

Test Plan:
This is a port of a diff that we've been using in debug builds of FB4A,
Messenger, and Instagram for a few months.  All three still build and
start.
Update DX to use single-pass merging.

Summary:
Previously, when merging many dex files, DX would incrementally merge
each one into the sum of the previous ones, which required N^2 time.
Now we use the new DexMerger constructor to merge them all in a single
pass, which is linear-ish.

Test Plan:
This is a port of a diff that we've been using in debug builds of FB4A,
Messenger, and Instagram for a few months.  All three still build and
start.
Make /etc/dx executable and update the libdir variable.

Summary: This is necessary for executing dx out of the Buck build directory.

Test Plan: Did a build with dex merging.
Update scripts and configs to point at kitkat dx instead of jellybean.

Summary:
Just removing the (moe-stripped) gitignore line, because we don't build
dx with Buck anymore.

Test Plan: Built an app with dex merging.
The `GenStringSourceMapStep` can now be enabled by `passing build_string_source_map = true` to `android_binary()`.

Summary:
This is part 2. The first diff added the new build step, this diff makes
it available.  I'm amazed that I need all this code to add a simple
on/off option. It works, but I wish it was less code.

Test Plan:
`buck build pages`
To enable the new step, add this to fbandroid/BUILD_DEFS after line 712:
`build_string_source_map = (buck_package_type == 'release'),`
Remove dead buck code.

Summary: The convenience method `BuckBlockJUnit4ClassRunner#runTest()`
isn't used anywhere, and inhibits understanding of the code!

Test Plan: Build and test in a clean repo.