Experimental change to template the whole condition variable on the lock type, rather than the wait functions