Correctly set testonly to test targets

testonly was not enforced in previous version of Bazel but this will
be fixed in the next version of Bazel. Correct it for re2.

Tested with `bazel build ...`

Tracking bug: bazelbuild/bazel#1967

Change-Id: I880326e99bc8ed4904473dcf0939bd7ab3b41b26
Reviewed-on: https://code-review.googlesource.com/8610
Reviewed-by: John Cater <jcater@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/BUILD b/BUILD
index f4abb0a..5223f6e 100644
--- a/BUILD
+++ b/BUILD
@@ -89,6 +89,7 @@
 
 cc_library(
     name = "test",
+    testonly = 1,
     srcs = ["util/test.cc"],
     deps = [":testing"],
 )
@@ -155,12 +156,14 @@
 
 cc_library(
     name = "benchmark",
+    testonly = 1,
     srcs = ["util/benchmark.cc"],
     deps = [":testing"],
 )
 
 cc_binary(
     name = "regexp_benchmark",
+    testonly = 1,
     srcs = ["re2/testing/regexp_benchmark.cc"],
     linkopts = [
         "-lm",