IdTool: handle group_id on python3

group_id is used as key of OOBtree and as documented, it's not
possible to mix keys that can not be compared, so we can not have a mix
of string and bytes, for consistency with other BTrees, such as the
ones used for OFS.
group_id is also used in a SQL column which is BINARY, this is
problematic on py3 because the selected values will be returned as bytes,
but we expect str here. Because we don't want to run a data migration,
we adjust the select methods to convert to str while selecting.

Since years there was a warning that id_group must be a string, now we
make it a bit stricter, we also enforce that the id_group is valid UTF-8.

A few more tests and assertions were also added.

Reviewed-on: !1980
27 jobs for for_testrunner_2 in 0 seconds
Status Job ID Name Coverage
  External
canceled ERP5.CodingStyleTest-TestRunner2

129:29:00

failed ERP5.UnitTest-TestRunner2

05:07:13

passed ERP5.CodingStyleTest-TestRunner2

10:18:52

failed ERP5.CodingStyleTest-TestRunner2

00:02:23

failed ERP5.CodingStyleTest-TestRunner2

00:01:57

failed ERP5.CodingStyleTest-TestRunner2

00:02:34

failed ERP5.CodingStyleTest-TestRunner2

00:02:36

failed ERP5.CodingStyleTest-TestRunner2

00:02:54

passed ERP5.CodingStyleTest-TestRunner2

02:36:30

failed ERP5.CodingStyleTest-TestRunner2

00:02:05

passed ERP5.CodingStyleTest-TestRunner2

01:02:19

failed ERP5.UnitTest-TestRunner2

00:01:09

failed ERP5.UnitTest-TestRunner2

00:01:24

failed ERP5.UnitTest-TestRunner2

00:01:11

failed ERP5.UnitTest-TestRunner2

00:01:07

failed ERP5.UnitTest-TestRunner2

06:34:18

failed ERP5.UnitTest-TestRunner2

05:03:38

passed ERP5.UnitTest-TestRunner2

02:19:31

failed ERP5.UnitTest-TestRunner2

00:01:12

failed ERP5.UnitTest-TestRunner2

05:36:44

failed ERP5.UnitTest-TestRunner2

07:52:21

failed ERP5.UnitTest-TestRunner2

00:01:09

failed ERP5.UnitTest-TestRunner2

00:01:15

failed ERP5.UnitTest-TestRunner2

04:02:51

failed ERP5.UnitTest-TestRunner2

00:01:10

failed ERP5.UnitTest-TestRunner2

00:01:12

failed ERP5.UnitTest-TestRunner2

00:01:16