CategorySelect: fixes BugId:97334 and BugId:97512.

Now that we are using core category link building again due to
BugId:97398, I was able to refactor and simplify the way CategorySelect builds
links on article pages and edit page previews.
Fix for cases where there are no categories.
Add category type as a class name to category list items.
Make categories always show up in the same order (hidden last).
Merge pull request #424 from Wikia/bugid-97334

CategorySelect: fixes BugId:97334 and BugId:97512.