travis: Only run Valgrind when all tests pass

According to the [documentation](http://about.travis-ci.org/docs/user/build-configuration/#Build-Lifecycle), `after_script` is always run whatever the build passed or not.

In order to prevent false positive leaks, make Valgrind run only upon a successful build, as an `after_success` step.