leakcheck: Have valgrind return error code on errors.

This should perhaps be integrated into the cmake tests?