missing dependencies from configure

It seems the build requires valgrind and hg, but it is not checked for in configure.