file I/O and work queue

Rough implementation of a thread safe queue, a logging thread and a file
I/O thread, along with a simple scaffold to measure throughput.