Count number of waiters in wait_write
Enable C++11 move to reduce copying
Use C++ move where needed