pagegenerators.py: refactoring of arg parsing
pagegenerators.py: refactoring of arg parsing

Refactoring of arg parsing:
- length checking logic per argument is avoided.
- number of local variables has been reduced.
- logic and variable names are uniform for all args.

Signed-off-by: xqt <info@gno.de>

Change-Id: If3f091750bf8eb01fa19cf67185afd4eca6b8d60

h4ck3rm1k3/pywikibot-core,jayvdb/pywikibot-core,happy5214/pywikibot-core,Darkdadaah/pywikibot-core,hasteur/g13bot_tools_new,smalyshev/pywikibot-core,magul/pywikibot-core,happy5214/pywikibot-core,wikimedia/pywikibot-core,npdoty/pywikibot,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,PersianWikipedia/pywikibot-core,darthbhyrava/pywikibot-local,h4ck3rm1k3/pywikibot-core,hasteur/g13bot_tools_new,npdoty/pywikibot,magul/pywikibot-core,Darkdadaah/pywikibot-core,wikimedia/pywikibot-core