C++ reimplementation of singlejar tool: first checkin, take two: fix the problem that caused the rollback.

*** Original change description ***

Automated [] rollback of commit f667aa54f4fcc2c04182de9bc267a7ee469f6445.

*** Reason for rollback ***

Breaks CI, see, e.g., http://ci.bazel.io/job/bazel-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=ubuntu_15.10-x86_64/92/console

*** Original change description ***

C++ reimplementation of singlejar tool: first checkin.

--
MOS_MIGRATED_REVID=127554239
diff --git a/src/tools/singlejar/BUILD b/src/tools/singlejar/BUILD
new file mode 100644
index 0000000..bca525a
--- /dev/null
+++ b/src/tools/singlejar/BUILD
@@ -0,0 +1,72 @@
+# Description:
+#   singlejar C++ implementation.
+package(default_visibility = ["//src:__subpackages__"])
+
+filegroup(
+    name = "srcs",
+    srcs = glob(["**"]),
+    visibility = ["//src:__pkg__"],
+)
+
+cc_test(
+    name = "input_jar_scan_jartool_test",
+    size = "large",
+    srcs = [
+        "input_jar_scan_entries_test.h",
+        "input_jar_scan_jartool_test.cc",
+        ":input_jar",
+    ],
+    copts = ["-DJAR_TOOL_PATH=\\\"external/local_jdk/bin/jar\\\""],
+    data = [
+        "//external:jar",
+        "//external:jdk-default",
+    ],
+    deps = ["//third_party:gtest"],
+)
+
+cc_test(
+    name = "input_jar_scan_ziptool_test",
+    size = "large",
+    srcs = [
+        "input_jar_scan_entries_test.h",
+        "input_jar_scan_ziptool_test.cc",
+        ":input_jar",
+    ],
+    deps = ["//third_party:gtest"],
+)
+
+cc_test(
+    name = "input_jar_bad_jar_test",
+    srcs = [
+        "input_jar_bad_jar_test.cc",
+        ":input_jar",
+    ],
+    deps = ["//third_party:gtest"],
+)
+
+cc_test(
+    name = "zlib_interface_test",
+    srcs = [
+        "zlib_interface_test.cc",
+        ":zlib_interface",
+    ],
+    deps = [
+        "//third_party:gtest",
+        "//third_party/zlib",
+    ],
+)
+
+filegroup(
+    name = "input_jar",
+    srcs = [
+        "diag.h",
+        "input_jar.h",
+        "mapped_file.h",
+        "zip_headers.h",
+    ],
+)
+
+filegroup(
+    name = "zlib_interface",
+    srcs = ["zlib_interface.h"],
+)