Update base.py

Changed query in DemogData().iterurls from 'select id, url <...>' to 'select distinct id, url <...>'

For this change to be useful, one should
    create index history_id_url on history (id, url)
in the database.