Fix unit tests

This PR contains fixes to ut_recentcontactsmodel and ut_groupmodel to make all tests pass again.

It also contains one behavior change: GroupManager now sorts events by endTime rather than by startTime. I think sorting by endTime (which is the local timestamp, for messages) is actually the intended behavior.