Added extra checks for xbmc.abortRequested and progress.iscanceled

Sync now checks before every API request in a loop as well as before every function.