improved fifo test

buffer overlap test is failing
added valgrind to makefile

fixed some uninitialized variable bugs in tests too
fixed major buffer overflow problems with fifo

for both read and write operations we were memcpy'ing
over the buffer boundary when the read pointer was
close to the edge of the boundary and the amt
read/written was enough to cause it to wrap.
forgot to add valgrind suppression file
altered query_test to make it valgrind clean
make ui_state_test valgrind clean
made util_test valgrind clean
fix bug introduced in commit 6468b067a9736318a0db0850b200e44db4578e31

the second if applies too if cmd == UI_QUERY_CMD_CHOOSE
Merge branch 'master' into port_osx

Conflicts:
	Makefile
	test/db_test.c
	test/encoding_test.c
	test/fifo_test.c
	test/query_test.c
	test/ui_state_test.c
	test/util_test.c