(bug 64087) fix for indexing set in category.py; code improvements

with https://www.mediawiki.org/wiki/Special:Code/pywikipedia/6428
a list was replaced by a set. Now indexing a set failes.

Solving this problem, we can easily replace that indexing by
enumerating the set which gives us both: the index value and the
category.

Some code improvements:
cat.title().split(':', 1)[1] can be replaced by cat.title(withNamespace=False)

Page.title() now is able to return labeled links if withNamespace parameter is False. e.g.
[:%s|%s]] % (sc[i].title(), sc[i]title().split(':', 1)[1]) can be replaced by a simple title() statement.

Adding "noisy dots" to show that bot is still running while
generating the category tree.

-depth option added for the maximum category depth. Default is
set to 5 which also needs a long time to compute it.

Change-Id: I463b7416bbf67ee8fb90dbeed525fc834aadc7d0
Merge "(bug 64087) fix for indexing set in category.py; code improvements"