ha-tests: close stdin, stdout, and stderr and replace with /dev/null.

Use dup2() to make /dev/null the stdin, stdout, and stderr file
descriptors. Supresses output from child processes.