* 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
* Use ancestry in the index and add test
* Add tests for show action
* Return complete comments trees for index, kill n+1 and use correct edge cache key
* Return complete comments tree for show, kill n+1 and use correct edge cache key
* Refactor tests and add surrogate keys tests
* Preload users for the whole subtree
* Clarify explanation of the edge cache keys construction
* Refactor partials
* Remove action caching
* Replace .map.flatten with .flat_map
* Fix surrogate key prefix according to Fastly docs
* Add comment.purge to Comments::BustCacheJob to use Fastly-Rails
* Fix surrogate key spec
* Preload organization, not user
* Preload users only when needed
* Pre-load podcasts for podcast episodes in API
* Avoid eager loading error by loading rating votes separately
* Preload associations for moderation
* Preload user comments in trees
* Preload organization for non org dashboard and cleanup queries
* Optimize ArticleSuggester to only load N articles at need
* Remove eager loading and pass variables to partials for easier debug
* Reorganize tags validation code and ignore actsastaggableon eager loading issues
* Remove unused eager loading and bring up comments relation
* Preload podcasts when loading podcast episodes
* Fix views specs
* Make sure ArticleSuggester never returns duplicates
* Remove commented code
* Re-trigger build
* Move suggested articles back to view to respect fragment caching
* Add system test to create article from the editor
* Move article creation from API to app controller
* Fix system test to edit posts
* Move article update from API to app controller
* Rewrite create article API using API key
* Add main_image and canonical_url to allowed creation params
* Rewrite update article API using API key
* Fix tests and have Comments API inherit from API
* Initial automatic cleanup with rubocop
* Fix syntax error introduced by rubocop
* Cleanup seeds file
* Cleanup lib folder
* Exclude bin folder because it contains auto generated files
* Make Rubocop a little bit more chatty
* Block length should not include comments in the count
* Cleanup config folder
* Cleanup specs
* Updated Rubocop version and generated a todo file
* Fix broken ArticlesApi spec
* Fix tests
* Restored rubocop pre-commit hook