preserve sortKey exactly when (de)serializing category links

an empty sortKey and a null one are not considered the same anymore
- in Category.aslink()
  by checking `key` against None
- in textlib.getCategoryLinks()
  by making the regex catch empty sortKeys

TestCategoryRearrangement has been introduced to ensure that
the bot doesn't do any undesired changes to the text

Change-Id: Ief9d5f95b37f949d667a0ffd43d79b69d12bd8d7