Add valgrind target to test for leaks
Add test coverage
More tests

Also refactor tokenize() and Config() to reduce valgrind warnings (none
appear on the testsuite, but are being reported in the actual
executable).