Fix leak of a mutex and a condition if thread creation fails in timer_create_queue.
Remove unnecessary call to pthread_exit, the main thread is waiting with pthread_join.
Add volatile qualifier to variables 'list' and 'running' of timer_queue_t. They are modified and read in different threads.
Remove the asynchronous cancellation of the timer threads. It is not safe and pthread_cancel is never called.