Add ability to pass a retval pointer to `thread_t::join()`