(NC-188) Group primary key is ID, not name.

Rework the database, storage protocol, and HTTP API to use the group's ID as the primary key. See individual commit messages for more details.