unit tests: fix bug in clear_recorded_errors

In the unit test infrastructure, clear_recorded_errors was leaving
g_recorded_errors pointing to uninitialized memory.

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
add the ability to detect more cond variable errors

* detect free-while-waiting-on-cond

* detect simultaneous wait with different lock parameter

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>