(BugId:99348) - Attempt to fix category duplication in the editor.

https://wikia.fogbugz.com/default.asp?99348

TLDR: Give saving editor content the same treatment as saving categories on article pages. 

Previously, only categories in the module were checked for duplicates. This changeset introduces extracting categories from the article wikitext as well, merging them with the categories from the module and then removing duplicates.

Along with this change, there is some small cleanup work to make things more consistent and more easily unit testable (such as removing converting to/from formats for getUniqueCategories).