Replace the community_summary view by a table

Fixes #2693 without reverting back to using slow queries.