Disable and remove pthreads to support compiling with clang
Allow closing a monitor connection to force the server to quit