use valgrind to run external tests on all linux runners

Using valgrind with the external test in the ubuntu 14.04 i386 has caught quite a few memory errors.

We should probably use valgrind to run the tests in all the linux-based runners.

Also, valgrind has a command line argument will make it fail on memory errors, or pass on the program's return value on exit. That seems like a great way to go as memory errors should cause the CI build to fail.