Distributed engine code cleanup: split select_best_move() in two functions.