Some small errors fixed, and changed PVSDatabase to use C++11 threads instead of the old nxcommon thread API