Previously, every loaded account kept a record of the groups in which
it is a direct member. However, the creation of the list in the
account cache caused some issues. For instance, changes which were
migrated to NoteDb required the group index to be present (as we need
an author, which is loaded from the account cache, for the NoteDb
commit). Furthermore, indexing accounts also required the group index
to be present. In all of the troublesome cases, the loaded list of
groups wasn't even used.
To solve those issues, we move the code which uses the group index to
the only class (IncludingGroupMembership) which needs that code.
Consequently, we can remove the field 'internalGroups' from
AccountState and get rid of all related code in the implementation of
the account cache.
To not increase the latency for the method calls on
IncludingGroupMembership too much, we'll cache the list of groups in
an independent cache in a follow-up change.
Change-Id: Idcbcf0cfb767d259a8eef1ddd7ce3053b5ae46d7