A version of the code with a posix thread wrapper mostly implemented. Some unit tests don't pass, and would have to be fixed before the code would be usable. This commit is probably a dead-end, because C++ 11's thread support makes a posix wrapper unnecessary.