interwiki.py: check for category before emptiness
Currently, page.isEmpty() requires parsing the whole page and doing some
removals (langlinks and categories) which takes up significant CPU time.
There are 2 checks which use page.isEmpty() as the starting condition
while having a much simpler second condition of just checking the page
In this patch, I reversed the checks order. For categories, the time
taken in batchLoaded() is reduced to about 30% of the original time.