[WIP] Fix search and start getting categories set
[JRO] Better use friendly_id

friendly_id works well enough out of the box but to best use its
features there were some things missing. Specifically - correct indexes
and tables supporting the history and scoping parts of friendly_id.

* use the friendly finder where necessary
* create friendly_id_slugs table
* add slug to thredded_categories and generate slugs if they are not
  there
* change unique index on topics if possible
* add a test checking for the topic search being fully functional. There
  was a regression on the last release.
* make the category filter for topics actually work