cpoll: code cleanup; added Mutex, ScopeLock, and PThreadMutex
cppsp: protect dlopen(), dlclose(), and dlsym() calls with mutex