Nearly a thousand Islamic State fighters have surrendered to Kurdish forces after the terror group lost its last major city in Iraq.