Fix livelock in QSV encoder when QSV fails to process frames

When QSVHelper.exe gets stuck the surfaces are never released, hence
idle_tasks remains empty