All uses of thread_flags_wake() also had to set the flags anyway, so we can just combine those operations into a new thread_flags_set_internal() and update the users to use that instead.