make thread safe sockets configurable
Merge pull request #446 from JoshMcKin/config_thread_safe

Make thread safety configurable