interwiki.py: add and reorganize error handling around ignored links

Handling of InvalidTitle is added to deal with comments like
<!-- [[Category:{{ja}} {{noun}}]] -->. Two consecutive try-except
blocks are unified for readability.

Change-Id: I890f4071b829aebcb75d32825ae886b5261f2852
Merge "interwiki.py: add and reorganize error handling around ignored links"