Only store currently-existing categories in the categories table
A "currently-existing category" is defined as a category that either
contains any pages or has a description page. Thus:
* Category::initialize() now schedules an update to insert a row if the
title exits but the row is missing.
* Category::refreshCounts() now removes the row if the title doesn't
exist and the category is empty.
* WikiPage::onArticleCreate() loads the Category object, to trigger
bullet #1.
* WikiPage::updateCategoryCounts() refreshes the counts if it results in
the row showing 0 pages, to trigger bullet #2.
* LinksDeletionUpdate refreshes the counts if the row shows 0 pages, to
trigger bullet #2.
A maintenance script is provided to update the category table for this
new definition.
Bug: T28411
Bug: T50824
Change-Id: I0f0adf124c181ae5d3c7c95b3b5fb275a725794c