ChangeMentor currently ignores mentees who happen to be opted-out (MentorManager::getMentorshipStateForUser( $user ) === MentorManager::MENTORSHIP_OPTED_OUT). This causes troubles for eg. the ReassignMentees class, which subsequently leaves opted out mentees assigned to the former mentor, which is (again) not the desirable behaviour.
In theory, opted-out mentees should not have a mentor assigned in the first place, but for various reasons, it still happens from time to time (see T351415 as an example). To account for that, let's make ChangeMentor automatically drop the mentor/mentee relationship whenever it notices a opted out mentee, rather than refusing to process the mentee altogether.