optimise view count calculation query
Merge branch 'master' of https://github.com/discourse/discourse