[threads] Inline thread_cleanup into mono_thread_detach_internal (#4119)