Add request-time merge of server and per-dir cosign configs.

Modified cosign_merge_cfg to accept either a cmd_parms or request_rec pointer.
rearchitecting mutex handling
add autoconf support for pthreads detection
libsnet also enables pthreads via autoconf