code for condition-variables and some more tests extracted from the srfi