On windows, make lock/thread function tables static This requires us to have a separate implementation of the lock macros that indirects to a set of functions. Fortunately, this isn't too hard to do. This may be a fix for bug 3042969, where our openssl dll and our libevent dll each got their own version of the thread stuff.