@michaelcahill: I put this code in as a new mutex type `pthread_logging` -- it seemed to me that made more sense than using something like HAVE_DIAGNOSTIC, I thought we might want these statistics on non-diagnostic builds.   Let me know if you want it done some other way, I don't care much.