Ported unusedfiles.py to pywikibot/core, added unicode support.
Ported unusedfiles.py to pywikibot/core, added unicode support.

From unusedfiles.py from pywikibot/copmat to pywikibot/core. Porting
involved changing the import files. Patched to include Unicode support 
using encode method on relevant strings. Fixed previous way variable
"uploader" was initiated, as it wasusing indexing to access a 
dictionary in a list, causing an error, now uses the correct key.

Bug: 56901
follow-up from I8bb5bdcf1518f33a1d40ec807f752bf27a5d73a4
Change-Id: I724c1b8e8ea97be6aac21e4533d303466e1e90a0

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