LinksUpdate: Use DB key for category links table
The first parameter returned from findVariantLink() is not the DB key,
which whitespaces should be replaced with underscores.
- Replaced Title::makeTitleSafe with Title::makeTitle, invalid links would be treated as plain text by the parser and can never hit this code path. And the makeTitle function below is also using Title::makeTitle.
- Updated the document of findVariantLink().
Reason for backport: The bug was introduced by refactor (commit d3b2b80)
and I found this is annoying in production.
(cherry picked from commit 1132c3dc19bfa0604c5605340c1dd11587d05789)