topic.rating rewrite

 calculationg the rating of a topic at every index#show is a desaster.
 now we save the rating in Topic.rating and recalculate on every
vote#create or vote#update
    testing and write_attribute fix