SERVER-8734 use a recursive mutex to work around OpenSSL deadlock