Miscellaneous fixes

A few issues with `cond_var` and add a `memset` implementation which allows things to compile with `--opt-level=0`
Drop a todo comment here that this one is required for exception handling only and should be removed.