veyron/lib/testutil/integration: re-order subprocess shutdown

This CL causes the integration test library to Kill() the subprocess
before calling Shutdown on its handle. This should not affect the output
of subprocesses and will help to ensure that processes that stay alive
after stdin do not cause test timeouts.

Change-Id: I80ca5d0bf70824161a6d6f1c7ef1fd0b43aa5455
diff --git a/lib/testutil/integration/util.go b/lib/testutil/integration/util.go
index b570f80..906dc3e 100644
--- a/lib/testutil/integration/util.go
+++ b/lib/testutil/integration/util.go
@@ -219,10 +219,12 @@
 }
 
 func (i *integrationTestBinaryInvocation) Kill(sig syscall.Signal) error {
+	// TODO(sjr): consider using vexec to manage subprocesses.
 	pid := (*i.handle).Pid()
-	(*i.handle).Shutdown(nil, nil)
 	i.env.Logf("sending signal %v to PID %d", sig, pid)
-	return syscall.Kill(pid, sig)
+	err := syscall.Kill(pid, sig)
+	(*i.handle).Shutdown(nil, nil)
+	return err
 }
 
 func readerToString(t Test, r io.Reader) string {