js: More cleanups to the stack form
Keep track of all groups, not just "important" ones.

We'll need this if we want to allow maintainers to allow only specific groups
to manage their Stacks.