[coop handles] Add mono_internal_thread_handle_ptr () function