Fix some minor memory leaks in the testing frame work.

There are still a number of memory leaks in the queueing tests
Free memory when the request queues get closed.