[FIX] checkimages: Convert generator to iterator
[FIX] checkimages: Convert generator to iterator

With ff628236 the general handling of the script changed and with that it also
now used duplicates based on the hash differently. It tried to step through the
generator but that is not possible without turning them first into a iterator.

Bug: T105188
Change-Id: I02791b150b000beda86b7510663badaf842b41ba

valhallasw/pywikibot-core,npdoty/pywikibot,Darkdadaah/pywikibot-core,jayvdb/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,jayvdb/pywikibot-core,happy5214/pywikibot-core,Darkdadaah/pywikibot-core,wikimedia/pywikibot-core,icyflame/batman,hasteur/g13bot_tools_new,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,smalyshev/pywikibot-core,PersianWikipedia/pywikibot-core,happy5214/pywikibot-core,emijrp/pywikibot-core,TridevGuha/pywikibot-core,trishnaguha/pywikibot-core,VcamX/pywikibot-core,h4ck3rm1k3/pywikibot-core,magul/pywikibot-core,darthbhyrava/pywikibot-local,hasteur/g13bot_tools_new,npdoty/pywikibot