Update discussion counts on archive

For issue #1494 

I didn't see any attempt at counting motions per group other than a DB column, so left that for another pull request.

Is there a concept of unarchiving? If so we'll want to increment the counter if a discussion comes back to life somehow.
Yea.. it's a bit too crazy atm.. and will probably run too slow on the production database.
Some pointers:
Don't use Group (or anything) .all unless you're sure the result set is small. Use find_each instead, it finds in batches so we don't blow up the ram.

In the migration below you're pulling a lot of stuff into memory. Can we try doing this with ids and .count calls?

I think the following should do the trick.

discussion_ids = group.discussions.where(archived_at: nil, is_deleted: false).pluck(:id)
motions_count = Motion.where(discussion_id: discussion_ids).count