Although groups may be "missing" due to patch sets being created prior
to the schema migration that added that field, the fact that these
are represented in the database as null is an implementation detail.
In practice we do not distinguish between empty groups and null
groups, so potentially returning both of them from the API is
confusing. Note that we definitely don't distinguish between these in
the secondary index.
Require that groups always be a non-null, and check for an empty group
list to determine whether groups are "missing". This also means it's
natural to use a List<String> for groups, which are naturally an
ordered list. The one place where this doesn't hold is when coming out
of GroupCollector, which for internal reasons needs to use a Set for
deduplication. Have the few callers of that class copy the result to a
list.
Change-Id: I0b276e16b3ac02fd882ff1cb23d5dfd1fc7bcd20