Pass self to lock methods.

This avoids frequent recomputation of
Thread::Current/pthread_getspecific.

Also add a futex based reader/writer mutex that is disabled.

Change-Id: I118fdb99ef1d1c4bfda6446ba3a0d8b6ab31eaee
diff --git a/src/reference_table.cc b/src/reference_table.cc
index 1f6cab7..19b6d42 100644
--- a/src/reference_table.cc
+++ b/src/reference_table.cc
@@ -17,6 +17,7 @@
 #include "reference_table.h"
 
 #include "indirect_reference_table.h"
+#include "mutex.h"
 
 #include "object.h"
 
@@ -63,7 +64,7 @@
   bool operator()(const Object* obj1, const Object* obj2)
     // TODO: enable analysis when analysis can work with the STL.
       NO_THREAD_SAFETY_ANALYSIS {
-    Locks::mutator_lock_->AssertSharedHeld();
+    Locks::mutator_lock_->AssertSharedHeld(Thread::Current());
     // Ensure null references and cleared jweaks appear at the end.
     if (obj1 == NULL) {
       return true;