Fix current frame selector wrapping condition
This could cause a desync between first and cur, which results in skipping a frame, halting the decoding.
This desync typically doesn't occur "long enough" in the current state of the project to trigger the bug, as some previous frames would fix this cur back.
In order to trigger this, one needs to call reset_task_cur() on the last frame, this would be the call post insertion of the INIT task (during dav1d_task_frame_init).
This doesn't happen as we would normally pick a task from a previous frame already in the queue.
Edited by Victorien Le Couviour--Tuffet