Add integration tests for GroupInvitationManager
This MR is based on !433 (merged). It adds some integration tests for the private group invitation protocol. One of those tests fails at the moment.
It does not yet cover all corner cases, so it does not fully address #760 (closed), but addresses a part of it. Suggestions for more scenarios to test are welcome.
[Wording changed to prevent #760 (closed) from being closed automatically based on the description.]