Perform initial work to replace BAM and SAM header code, and integrate it. Not 100% stable yet.
Remove the remaining bamtools files.
Add files missing from previous checkins.
Increase performance of SAM writer by removing redundant calls.
Merge branch 'master' into bamalignment_nocache
Remove unnecessary call.
Modify ThreadJobs to keep track of completion, fixing some rare crashes introduced in last week's rewrite of Bgzf*Stream. Many implementations of ThreadJob implement this feature in unsafe ways- only the ThreadPool class can ensure that the job is completely off the execution queue before indicating that the job is complete. Some crashes were caused when jobs that had finished executing but were still in the ThreadPool's queues were deleted.
By default, compress the temporary file created. I am not making this configurable at this time, since we will soon not need a temporary file for this feature.
Fix case where we can take a reference to an rvalue, potentially causing a crash.
Increase performance of some functions by reducing the number of times part of a read must be decoded (i.e., remove redundant getCigar and getQualities calls)
Handle a case where ThreadPool::waitForJobCompletion doesn't wait for jobs that have been started but not finished.
Fix regression in repeatseq caused by the introduction of ThreadPool tracking which jobs are done.
Increase performance of code that either reads tags or checks for the existence of tags.
Name thread pool worker threads (previously, they would inherit the name of the thread that instantiated the pool they were a part of).
Fix potential assertion failure in debug mode.
LR: delete thread jobs at the appropriate time. Fixes crash caused by the ThreadJob/ isDone() patch 2 days ago.
Add support for trylock to spin locks, and clean up a trylock-related error message.
Replace the lock in flushEmitQueue to use a try lock instead of a real lock. This ensures that we don't end up with all threads waiting on this lock when the queue is full.
Also, replace raw pthreads locks with the lock class. This reduces the total code by ~60 lines. In the future, we can look at replacing the CMFM lock with a spin lock for performance, since most locks are try locks.
Remove debug code, and minor optimizations to increase speed of LR.
Fix trivial warning.