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.