Create a proper wrapper script for executing "bazel" in the integration tests.

Currently a call to "bazel" in an integration test means calling a (quite
hidden) function in test-setup.sh which actually calls "$bazel" defined
in "shell/bazel/testenv.sh" which is equal to "$(rlocation io_bazel/src/bazel)".
This is extremely confusing and error prone.

The new mechanism is to add a wrapper script to shell/bin called bazel
and export this directory to the PATH. 

Moreover, not every test loads the same test environment, for instance consider
how bazel_query_test loads the test environment:
- Load shell/integration/testenv.sh which loads,
- shell/bazel/test-setup.sh which loads,
- shell/bazel/testenv.sh which loads,
- shell/unittest.bash which loads,
- shell/testenv.sh

Again this is error prone and specially hard to understand, in fact
each test writer needs to decide which of these testenv to load. 
This change fixes all of this by having only one testenv.sh 
and summarizing the test setup in integration_test_setup.sh. 
Namely, for any new integration test, the developer
needs to load integration_test_setup to get the environment set up including
the unittest framework (also it helps to attract contributions).

This change also allows to open sourcing client_sigint_test: Since bazel was a 
function client_sigint_test was using a wrong process id to interrupt 
the build. The problem is that $! returns
bash's id instead of the id of the process running in the background 
when using a function instead of an executable.

A few tests needed to be adapted to the new infrastructure.

--
MOS_MIGRATED_REVID=136470360
diff --git a/src/test/shell/integration/java_integration_test.sh b/src/test/shell/integration/java_integration_test.sh
index 3ed4a18..a8041ce 100755
--- a/src/test/shell/integration/java_integration_test.sh
+++ b/src/test/shell/integration/java_integration_test.sh
@@ -15,23 +15,18 @@
 # limitations under the License.
 #
 # These are end to end tests for building Java.
-
-# Load test environment
-source $(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/testenv.sh \
-  || { echo "testenv.sh not found!" >&2; exit 1; }
-
-source $(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/shell_utils.sh \
+CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+source "${CURRENT_DIR}/../shell_utils.sh" \
   || { echo "shell_utils.sh not found!" >&2; exit 1; }
 
+# Load the test setup defined in the parent directory
+source "${CURRENT_DIR}/../integration_test_setup.sh" \
+  || { echo "integration_test_setup.sh not found!" >&2; exit 1; }
+
 set -eu
 
 declare -r runfiles_relative_javabase="$1"
-
-create_and_cd_client
-put_bazel_on_path
-
-write_default_bazelrc
-add_to_bazelrc "build --package_path=%workspace% --embed_changelist=none"
+add_to_bazelrc "build --package_path=%workspace%"
 
 #### HELPER FUNCTIONS ##################################################
 
@@ -199,16 +194,24 @@
   write_hello_world_files "$pkg"
 
   bazel build //$pkg/java/hello:hello_deploy.jar || fail "build failed"
-  function check_deploy_jar_works() {
-    "$@"  | grep -q 'Hello, World!' || fail "comparison failed"
-  }
-  function check_arglists() {
-    check_deploy_jar_works "$@" --singlejar
-    check_deploy_jar_works "$@" --wrapper_script_flag=--singlejar
-    check_deploy_jar_works "$@" REGULAR_ARG --wrapper_script_flag=--singlejar
-  }
-  check_arglists bazel run //$pkg/java/hello:hello --
-  check_arglists ${PRODUCT_NAME}-bin/$pkg/java/hello/hello
+
+  bazel run //$pkg/java/hello:hello -- --singlejar | grep -q 'Hello, World!' \
+    || fail "comparison failed"
+  ${PRODUCT_NAME}-bin/$pkg/java/hello/hello -- --singlejar | \
+    grep -q 'Hello, World!' || fail "comparison failed"
+
+  bazel run //$pkg/java/hello:hello -- --wrapper_script_flag=--singlejar \
+    | grep -q 'Hello, World!' || fail "comparison failed"
+  ${PRODUCT_NAME}-bin/$pkg/java/hello/hello -- \
+    --wrapper_script_flag=--singlejar | grep -q 'Hello, World!' \
+    || fail "comparison failed"
+
+  bazel run //$pkg/java/hello:hello -- REGULAR_ARG \
+    --wrapper_script_flag=--singlejar | grep -q 'Hello, World!' \
+    || fail "comparison failed"
+  ${PRODUCT_NAME}-bin/$pkg/java/hello/hello -- REGULAR_ARG \
+    --wrapper_script_flag=--singlejar | grep -q 'Hello, World!' \
+    || fail "comparison failed"
 }
 
 function test_explicit_bogus_wrapper_args_are_rejected() {