Update SQL to allow for multicontest: move the `cid` column from problem to a many-to-many table