Remove now unneeded fgpautils.h include from avalon.
Use semaphores to signal a reset to pause the read thread while the write thread does the actual reset, making all writes come from the same place.
Use the cgpu_info shutdown to determine when to stop the avalon read and write threads.
Send the shutdown message to threads and do the thread shutdown functions before more forcefully sending pthread_cancel to threads.