Make the 'Top' button somewhat work: sort by likes

Also use `_.last` instead of 2 if statements.
Make links from topics to parent categories work.
Show each topic's category name in the topic list

And accidentally move extraction of categories from HTML to QueryService
(where it belongs better anyway?).