lookahead: Keep b_exit_thread under ifbuf.mutex
The lookahead_thread main loop checks b_exit_thread and exits if it is set. That flag is set by x264_lookahead_delete, which uses ifbuf.mutex to guard accessing it. However, the read in the while-loop condition of lookahead_thread is not guarded, and so TSAN sometimes reports a data race.