Unbreaking and speeding up condition_variable test