Add support for running test drivers inside Valgrind.

This patch adds a '--valgrind' command line option to run_unit_tests.py. The option
accepts an argument which is a filename *pattern*. When this option is supplied,
each test case will be executed inside a Valgrind wrapper with the leak-check tool
enabled, and Valgrind's output will be directed (in XML format) to a file specified
by that pattern. The pattern will undergo string substitution with a single parameter,
which will be the test case number that is being executed (so the pattern should use
a "%d"-style format string to format it).
Correct some misspelled function names.