Refactor topics controller and model

Refactor: 
1) ```TopicsController``` refactoring to reduce code climate complexity.
2) ```Topic``` model,  group ```class_methods``` together using ```class << self```