tests/functional: add support for specifying valgrind options

This enables us to run valgrind with user defined options.

For example, to do the valgrind test on the small memory (less than 2
GB) machine, try the following command:

 # VALGRIND_OPTIONS="--freelist-vol=10000000 --freelist-big-blocks=0" ./check -valgrind

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
tests/functional: allow calling _wait_for_sheep() after _kill_sheep()

This can remove a lot of sleep and avoid a false alarm which happens
due to timing problems.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
tests/functional: check process in _wait_for_sheep_stop()

The sheep process can exist for a moment after it receives a kill
signal.  We have to wait until the process is surely killed.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>