Add valgrind to autotools and Travis CI

This makes our build system more robust and addresses issue #103