Refactored valgrind support.

7 jobs for ax-valgrind in 3 minutes and 50 seconds (queued for 1 second)