archivebot.py: fix template name comparison + loop refactoring
archivebot.py: fix template name comparison + loop refactoring

Change-Id: I9b6c156f63300269226b54f21107fd9050d72350

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