refactor Category

* move callback bodies to separate methods (easier to test)
messagebus diagnostics process path on Mac OS
Merge branch 'refactor-category' of git://github.com/goshakkk/discourse

Conflicts:
	app/models/category.rb
Merge pull request #397 from kubabrecka/fix_ps_warning

messagebus diagnostics process path on Mac OS