* Move calculating comments score from worker to a service
* Display displayed comments count in feed
* Recalculating displayed comments counts on article show (if needed)
* Rubocop fixes
* Fixed lambda
* Add downstream score effects from spam role
* Move async score calc down low
* Add tests
* Add stub
* Fix typo
* No need for guard
* No need for guard
* Add article's record key to Fastly Surrogate-Key to separate caches
After #4744 we successfully setup an auto purging system based on Fastly's surrogate key based cache and purging API.
Unfortunately this worked only in the `:show` action as comments are their own tree-based resource.
The `:index` though, is related to a single article, so without the article's record key in the `Surrogate-Key` header the first time we hit the API the result would become the value stored in Fastly's API, for all articles.
* Fix commentable mock for job spec
* Add comment.commentable.purge to the worker as well
* Add more thorough tests for commentable
* Add sidekiq version of the corresponding delayed job
* Switch the invocation of the delayed job from `after_create` to
`after_create_commit` to avoid the race condition where the worker can
be executed before the comment is persisted. Added covering spec
for this change.